Presentation is loading. Please wait.

Presentation is loading. Please wait.

Adding New Users.

Similar presentations


Presentation on theme: "Adding New Users."— Presentation transcript:

1 Adding New Users

2 User Accounts Typically, a user is an individual who can log in, edit files, run programs and make use of the system. Each user has a username (login name), a UID, one or more groups, and GIDs. User account information is stored primarily in the password file, found in /etc/passwd. The group information is stored in the group file found in /etc/group. These are both public files, where all users can read them but only root can modify them.

3 Adding New User Adding a new user can be divided into several steps:
Assign a user a name, a UID, primary group and decide which other groups she should be a member of Enter this information into /etc/passwd and /etc/group files Assign a password for the account Set other user account parameters Create a home directory for the user Use chown and chgrp to give the new owner ownership Add the user to any other facilities such as mail, printing and disk quotas Perform any other site specific initialization tasks. Test the new account.

4 Defining a new account Normally, the /etc/passwd file is the master list of information about users. Information about a new user needs to be added to this file. Each entry in the password file has the following form: name:coded-passwd:UID:GID:user info:home directory:shellsmith Smith:/home/smith:/bin/csh

5 Shadow password files Almost all recent UNIX implementations support shadow password files -files that are protected from all access by non-root users and that store the encrypted password. crypt - password and data encryption It is easy to tell when a shadow password file is in use: the password fields in the /etc/passwd are all set to ‘x’. The standard location of the shadow file is /etc/shadow.

6 Automating the Account Creation Process
It is common to create shell scripts to automate the account creation process. There are many variations of the adduser script. The advantage of these tools is that it takes care of remembering a lot of the steps in the process for you. System V.4 added a user creation command : useradd as well as usermod and userdel. Solaris systems as well as Linux systems with the shadow package have these tools.

7 UNIX Groups Groups may be defined in two ways:
Implicitly, by GID : whenever a new GID appears in the password file, a new group is defined Explicitly, by name and GID in the /etc/group file The /etc/group file lists all the system’s named groups: group_name::GID:additional-users chem::20:ben,alex,root

8 Standard UNIX Groups root –superuser
daemon -executes system server processes bin -typically owns the executable files sys -owns system files adm -owns the accounting files uucp -owns the uucp tools and files mail, news, lp -additional pseudo-users designed to own files and run processes needed by their subsystems auth -pseudo-users associated with system auditing files nobody -account used by the NFS protocol

9 Common Startup Files

10 Commonly used commands
useradd sudo useradd –g 1105 –c “Max R.” max userdel: removes a user account usermod: modify a useraccount sudo usermod –e “12/31/08” max: change the expiration date for the account groupadd sudo groupadd –g 1028 pubs groupdel


Download ppt "Adding New Users."

Similar presentations


Ads by Google