10 More Discussions You Might Find Interesting
1. Solaris
Hi all
I am facing difficulties when using the useraddcommand.
when running useradd -u 60006 -g 100 -d /opt/xxx/yyy/z -m -s /bin/false ftpuser
It does create the user, but with a wrong home directory. It creates its home directory at /home/ftpuser
Please can you help? (2 Replies)
Discussion started by: fretagi
2 Replies
2. HP-UX
Hi all
I wanted to change the home dir for a user, but when using smh :
SMH->Accounts for Users and Groups->Local Users->Modify User
----------------------------------------------------------------------------------------------------------------------------------------------
* Required... (8 Replies)
Discussion started by: fretagi
8 Replies
3. Shell Programming and Scripting
Hi,
In my script it takes the input from the user. i.e. sys or system.
How can i make it case insensitive in my code.
if || ; then
echo "valid"
Any help is appreciated.
Thanks,
priya (4 Replies)
Discussion started by: priya001
4 Replies
4. Solaris
Hi All,
I am trying to uninstall jdk 1.5 from my Solaris 10 64 bit but some how was not successful.so tried to delete the folder of jdk from /usr but its throughing error as:
Unable to remove directory jdk: Read-only file system
Even I tried to create a dir in /usr but its not allowing me... (4 Replies)
Discussion started by: Pshah
4 Replies
5. Red Hat
Hi
$ uname -a
Linux xyz 2.6.18-128.0.0.0.2.el5 #1 SMP Wed Jan 21 05:17:33 EST 2009 x86_64 x86_64 x86_64 GNU/Linux
I am unable to add a new user getting following
# id
uid=0(root) gid=0(root)... (5 Replies)
Discussion started by: ankurk
5 Replies
6. Homework & Coursework Questions
first off let me introduce myself. My name is Eric and I am new to linux, I am taking an advanced linux administration class and we are tasked with creating a script to add new users that anyone can run, has to check for the existence of a directory. if the directory does not exist then it has... (12 Replies)
Discussion started by: pbhound
12 Replies
7. Solaris
Hi All,
I am trying to create a folder in /export/home/user1 directory as a user1 but I am getting the error message as
-bash-3.00$ mkdir abc
mkdir: Failed to make directory "abc"; Permission denied
Also I tried creating the folder but it fails too
-bash-3.00$ touch abc
touch: cannot... (2 Replies)
Discussion started by: Manjunath K V
2 Replies
8. UNIX for Advanced & Expert Users
Hello All,
I am trying to extract a trademark character (™) from a varchar column in a DB2 Table. The result is to be placed in a sequential file in an AIX environment.
After the Extraction is complete when I view the extracted file I noticed that in place of the (™) Character another... (5 Replies)
Discussion started by: cosec
5 Replies
9. AIX
Hello, this is my first post.
I have a user who cannot create a file over 2 GB's in size eventhough the FS is large file enabled and I added a special stanza in /etc/security/limits to allow an unlimited file size for this particular user (user1 - see below).
ibm:/home/root (4062)#cat... (7 Replies)
Discussion started by: AIXtexas
7 Replies
10. UNIX for Advanced & Expert Users
Hi all,
I am using Sun Solaris 9 .In this system normal users unable to create files from the command line.I added these users in bin,adm and even root group i found them unable to create a file. (1 Reply)
Discussion started by: mallesh
1 Replies
useradd(8) System Manager's Manual useradd(8)
NAME
useradd - create a new user account
SYNOPSIS
useradd [-D binddn] [-P path] [-c comment] [-d homedir]
[-e expire] [-f inactive] [-G group,...] [-g gid]
[-m [-k skeldir]] [-o] [-p password] [-u uid]
[-U umask] [-r] [-s shell] [--service service] [--help]
[--usage] [-v] [--preferred-uid uid] account
useradd --show-defaults
useradd --save-defaults [-d homedir] [-e expire] [-f inactive]
[-g gid] [-G group,...] [-k skeldir] [-U umask] [-s shell]
DESCRIPTION
useradd creates a new user account using the default values from /etc/default/useradd and the specified on the command line. Depending on
the command line options the new account will be added to the system files or LDAP database, the home directory will be created and the
initial default files and directories will be copied.
The account name must begin with an alphabetic character and the rest of the string should be from the POSIX portable character class ([A-
Za-z_][A-Za-z0-9_-.]*[A-Za-z0-9_-.$]).
OPTIONS
-c, --comment comment
This option specifies the users finger information.
-d, --home homedir
This option specifies the users home directory. If not specified, the default from /etc/default/useradd is used.
-e, --expire expire
With this option the date when the account will be expired can be changed. expiredate has to be specified as number of days since
January 1st, 1970. The date may also be expressed in the format YYYY-MM-DD. If not specified, the default from /etc/default/useradd
is used.
-f, --inactive inactive
This option is used to set the number of days of inactivity after a password has expired before the account is locked. A user whose
account is locked must contact the system administrator before being able to use the account again. A value of -1 disables this
feature. If not specified, the default from /etc/default/useradd is used.
-G, --groups group,...
With this option a list of supplementary groups can be specified, which the user should become a member of. Each group is separated
from the next one only by a comma, without whitespace. If not specified, the default from /etc/default/useradd is used.
-g, --gid gid
The group name or number of the user's main group. The group name or number must refer to an already existing group. If not speci-
fied, the default from /etc/default/useradd is used.
-k, --skel skeldir
Specify an alternative skel directory. This option is only valid, if the home directory for the new user should be created, too. If
not specified, the default from /etc/default/useradd or /etc/skel is used.
-m, --create-home
Create home directory for new user account.
-o, --non-unique
Allow duplicate (non-unique) User IDs.
-p, --password password
Encrypted password as returned by crypt(3) for the new account. The default is to disable the account.
-U, --umask umask
The permission mask is initialized to this value. It is used by useradd for creating new home directories. The default is taken from
/etc/default/useradd.
-u, --uid uid
Force the new userid to be the given number. This value must be positive and unique. The default is to use the first free ID after
the greatest used one. The range from which the user ID is chosen can be specified in /etc/login.defs.
--preferred-uid uid
Set the new userid to the specified value if possible. If that value is already in use the first free ID will be chosen as described
above.
-r, --system
Create a system account. A system account is an user with an UID between SYSTEM_UID_MIN and SYSTEM_UID_MAX as defined in
/etc/login.defs, if no UID is specified. The GROUPS entry in /etc/default/useradd is ignored, too.
-s, --shell shell
Specify user's login shell. The default for normal user accounts is taken from /etc/default/useradd, the default for system accounts
is /bin/false.
--service service
Add the account to a special directory. The default is files, but ldap is also valid.
-D, --binddn binddn
Use the Distinguished Name binddn to bind to the LDAP directory. The user will be prompted for a password for simple authentica-
tion.
-P, --path path
The passwd and shadow files are located below the specified directory path. useradd will use this files, not /etc/passwd and
/etc/shadow.
--help Print a list of valid options with a short description.
--usage
Print a short list of valid options.
-v, --version
Print the version number and exit.
FILES
/etc/passwd - user account information
/etc/shadow - shadow user account information
/etc/group - group information
/etc/default/useradd - default values for account creation
/etc/skel - directory containing default files
SEE ALSO
passwd(1), login.defs(5), passwd(5), shadow(5), userdel(8), usermod(8)
AUTHOR
Thorsten Kukuk <kukuk@suse.de>
pwdutils May 2010 useradd(8)