Why can SetUID programs be a bad thing? What happens if you forget to add the home directory for a user? Get answers to these and other questions in this, part 2 of Managing Users from the book Linux Administration, A Beginner's Guide, third edition by Steven Graham and Steve Shah (McGraw-Hill/Osborne, 0072225629, 2002). See this link for Part 1.
Many of the Linux distributions come with their own GUI user managers. Red Hat comes with a utility called redhat-config-users that allows you to add/edit and maintain the users on your system. You can also find linuxconf from http://www.solucorp.qc.ca/linuxconf/. It has been my experience that these GUI interfaces work just fineójust be prepared to have to manually change user settings in case the GUI isnít working. Most of these interfaces can be found in the System Settings menu under GNOME or KDE.
Project 5-1: Adding/Editing a User
In this project, you will add a user to the system and make sure the user can log in to the system without any problems. When dealing with accounts it is always a good idea to do it right the first time, otherwise you might get the user frustrated because their shell isnít right or their e-mail isnít set up correctly. You will use the following steps to add the user and then change their shell to the tcsh shell.
Step by Step
1. First, add the user johndoe to the system with the adduser command:
2. Make sure to change the userís password by running the passwd program:
[root@ford /root]# passwd johndoe
3. Try to log in to the system as that user. This will let you know if everything is working correctly for the new user.
4. After getting their new account, the user decides they want /bin/tcsh as their shell. You just need to use the usermod command to change johndoeís properties:
[root@ford /root]# usermod -s /bin/tcsh johndoe
This project is simple and straightforward. If you are running your own computer, it is easy to keep all the users on your system in order. When you start having to administer many users, it is helpful to write a script to add many users at a time. There are endless possible customizations that you can make.
This chapter is from Linux Administration, A Beginner's Guide, third edition, by Graham and Shah. (McGraw-Hill/Osborne, 2002, ISBN: 0072225629). Check it out at your favorite bookstore today.