Shared web hosting - CHAPTER 30 MANAGING USERS 441 Table 30-1.

CHAPTER 30 MANAGING USERS 441 Table 30-1. System Groups Within Ubuntu Group Definition video Activates video acceleration for the user plugdev Allows user access to removable storage, such as card readers, digital cameras, and so on lpadmin Allows user to access the printer scanner Allows user to access the scanner tape Allows user to access tape storage devices (used for backup purposes) fax Allows user to access the fax facility admin Gives user system administration abilities (superuser powers) As you might have guessed, to manually add a user under Ubuntu, you must not only create a group and then add the user to it, but you must also add that user to the required selection of supplementary groups. Some are mandatory, such as audio, while others are optional, depending on how much freedom you want to afford the new user. You can add a user to supplementary groups by using the -G switch with adduser. Here s how to add a new user called raymond to the system so that he is able to make full use of the system (having first created a group called raymond): sudo useradd -m -g raymond -G adm,dialout,cdrom,floppy,audio,dip,video,plugdev, lpadmin,scanner,tape,fax,admin raymond Additionally, creating a new user using useradd won t automatically apply a password to the account. Ubuntu can t work with passwordless accounts, so until one is applied, the new account will be locked. You can add a password using the passwd command, as discussed in the next section. Deleting a user is mercifully simple compared to this! Use the userdel command, as follows: sudo userdel This won t remove raymond s /home/ directory, however. That must be done manually. Similarly, to delete a group, use the groupdel command: sudo groupdel Adding and Changing Passwords On a default Ubuntu installation, ordinary users are able to change their passwords at the shell. The command for any user to change his password is simple: passwd The user will be asked to confirm his current password, and then to enter the new password twice, to confirm that it has been typed correctly.

Leave a Reply