Solaris : Add a user with home directory
You must be root (superuser) to add a user.
-d home-directory-path
This is the new user’s home directory, typically /export/home/username
This is the new user’s home directory, typically /export/home/username
-m
make home directory and copy the default skeleton files (these files are located in /etc/skel directory).
make home directory and copy the default skeleton files (these files are located in /etc/skel directory).
-u uid
The uid (userid) is a number from 0 to 65535 which identifies the user on the system. uid 0 is reserved for root. If you don’t specify one, the next available uid will be used automatically.
The uid (userid) is a number from 0 to 65535 which identifies the user on the system. uid 0 is reserved for root. If you don’t specify one, the next available uid will be used automatically.
-c “User Name”
Comment field which usually contains the name of the user. Make sure you enclose the name in quotes if it contains a space.
Comment field which usually contains the name of the user. Make sure you enclose the name in quotes if it contains a space.
-s /path/to/shell
The shell to use. If you don’t specify this, it will default to /bin/sh. Make sure you specify the fully qualified path.
The shell to use. If you don’t specify this, it will default to /bin/sh. Make sure you specify the fully qualified path.
example:
useradd -d /export/home/ram -m -s /bin/ksh -c "ram singh" ram
No comments:
Post a Comment