12.07.2015 Views

Red Hat Enterprise Linux 5 Administration Unleashed

Red Hat Enterprise Linux 5 Administration Unleashed

Red Hat Enterprise Linux 5 Administration Unleashed

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

208CHAPTER 9Managing Users and GroupsFIGURE 9.3Modifying User PropertiesDeleting UsersTo delete a user, select her from the list and click Delete. When deleting a user, you havethe option of deleting the user’s home directory, mail spool, and temporary files. Changestake effect immediately, so clicking Yes will remove the user and the user’s files. Anyremaining files will still exist with the user’s old UID, so be careful when creating new users.If the UID is reused for a different user, you might be giving the new user access to the olduser’s files because file permissions are based on the UID and GID associated with the file.When using the graphical application, the private user group for the user is deleted whenthe user is deleted from the system. The user being deleted is also removed from anyother groups of which it was a member.Configuring via the Command LineIf you prefer the command line or do not have a graphical desktop installed on thesystem, the shadow-utils RPM package provides utilities to add, modify, and delete usersfrom a shell prompt.The commands discussed in this section require the administrator to be logged in as theroot user. If you are logged in as a non-root user, execute the su- command from a shellprompt, and enter the root password to become the root user.Adding UsersTo add a new user, use the useradd command. The basic syntax is useradd .The username is the only information required to add a new user; however, Table 9.1shows additional command-line arguments for useradd. The useradd command createsthe account, but the account is locked. To unlock the account and create a password forthe user, use the command passwd . By default, the user’s home directory iscreated and the files from /etc/skel/ are copied into it. The two exceptions are if the -Moption is used and if the home directory already exists.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!