Free web hosting with ftp - CHAPTER 30 MANAGING USERS Tip You can
CHAPTER 30 MANAGING USERS Tip You can tell when you re logged in as root user because the command prompt will end with a hash (#). When logged in as an ordinary user, it ends with a dollar sign ($). The hash symbol should be seen as a warning that you now have unrestricted control over the system, so be careful what you type and double- check everything before hitting Enter! As an alternative to setting the root password, you can simply type the following whenever you want to switch to the root user account: sudo su You ll be prompted for your login password, in exactly the same way as if you had just preceded a command with sudo. After this, you ll be logged in as the root user. To quit the root user account, type exit. UIDs and GIDs Although we talk of user and group names, these are only used for the end user s benefit. Ubuntu uses a numerical system to identify users and groups. These are referred to as user IDs (UIDs) and group IDs (GIDs), respectively. For various reasons, under Ubuntu, all the GID and UID numbers under 1000 are reserved for the system to use. This means that the first non-root user created on a system during installation will probably be given a UID of 1000. In addition, any new groups created after installation are numbered from 1000. On my system, the default user of keir had a UID of 1000 and a GID of 1000. The second user I added was given a UID of 1001 and a GID of 1001. Note UID and GID information isn t important during everyday use, and most commands used to administer users and file permissions understand the human-readable usernames. However, knowing UIDs and GUIDs can prove useful when you re undertaking more complicated system administration. Adding and Deleting Users and Groups The easiest and quickest way to add a new user or group is to use the Users and Groups tool under the System . Administration menu. Of course, you can also perform these tasks through the command line. Adding and Deleting Users via the GUI To add a new user, select System . Administration . Users and Groups and click Add User. You ll see the User Account Editor dialog box, as shown in Figure 30-1.