The following command is the equivalent to adding a user with User Manager.
# admuseradd -u 101 -g users -c "Kryten Series 4000" -s /bin/csh -k /etc/skel -x preadd=preaddscript -x postadd=postaddscript -x pw=NORM \ -x pwwarn=1 -d /export/home/kryten -m -x autohome=Y -x serv=jupiter kryten |
In this command,
| -u 101 | Specifies the user ID, in this case 101. |
| -g users | Specifies the user's primary group, in this case a group named users. |
| -c "Kryten Series 4000" | Specifies a comment for the user account. |
| -s /bin/csh | Specifies the default shell environment, in this case the C shell. |
| -k /etc/skel | Specifies a directory containing skeleton information, such as .cshrc, that will be copied into the user's home directory. |
| -x preadd=preaddscript | Specifies the user created script (preaddscript) located in /opt/SUNWadmd/Scripts that is designated to run before the user is added. |
| -x postadd=postaddscript |
Specifies the user created script (postaddscript) located in /opt/SUNWAdmd/Scripts that is designated to run after the user is added. |
| -x pw=NORM |
Specifies the initial password type, in this case normal. |
| -x pwwarn=1 |
Specifies the number of days that the user will be warned about password expiration. |
| -d /export/home/kryten |
Specifies the name of the home directory. |
| -m |
Creates the new user's home directory (as specified with the -d option) if it does not already exist. |
| -x autohome=Y |
Specifies whether the home directory should be set up to be automounted. |
| -x serv=jupiter |
Specifies the name of the server where the home directory will reside. |
| kryten |
Specifies the name of the system. |