[Next] [Previous] [Up] [Top] [Contents]

13.1.1 SunOS 4.1.X

13.1.1.1 Adding Users

1. Edit the /etc/passwd file to add the user - use vipw, as this program creates a lock file that prevents two people from trying to edit the password file at the same time. vipw also makes a copy of the original file in /etc/opasswd, and checks the consistency of the root password entry before saving the new version of the file.

Edit the /etc/group file to add the user to additional groups.

If you're using NIS update the databases on the server:
# (cd /var/yp; make) -or- (cd /var/yp; make passwd)

Give the new user a password with the passwd command:
# passwd username
This will prompt you twice for the user's password, without echoing.

Change to what will be the new user's proposed parent directory:
# cd /home/server

Create a directory for the new user:
# mkdir username

Copy any startup files, e.g. ".login", ".cshrc" into this directory:
# cp /usr/local/adm/users/.[a-zA-Z]* username

Set the proper user and group ownership of the directory and startup files:
# chown -R username.groupnname username - SunOS 4.1.X
# chown -R username:groupnname username - SunOS 5.X

Set the proper permissions on the directory and startup files:
# chmod -R 700 username


Unix System Administration - 8 AUG 1996
[Next] [Previous] [Up] [Top] [Contents]