CHAPTER 30 (Web hosting compare) MANAGING USERS Caution Many groups

CHAPTER 30 MANAGING USERS Caution Many groups are listed in the Main Group drop-down list. Nearly all of these relate to the way the Linux operating system operates and can be ignored. You should never, ever delete any of these, or add a user to them! User Privileges: The settings on this tab offer much more control over what a user can and cannot do on the system. Here, you can prevent users from using certain hardware, such as scanners or modems. You can also control whether the user is able to administer the system. Simply put a check alongside any relevant boxes. Deleting a user is simply a matter of highlighting the username in the list and clicking the Delete button. Note that the user s /home/ directory won t be deleted. You must do this manually with superuser powers, and it s best accomplished from the command-line prompt (see Chapter 14 for an introduction to basic file-manipulation shell commands). Creating and Deleting Groups via the GUI Adding a group is simply a matter of clicking the Groups tab in the Users and Groups program window (System . Administration . Users and Groups). After clicking the Add button, you ll be prompted to give the group a name. The group ID (GID) will be automatically filled in for you, but you could choose a different number if you have good reason to do so (remember to keep it above 1000 to keep in line with the way Ubuntu operates). It isn t essential that you add users to the group there and then but, once again, you ll see a lot of user accounts in the list that belong to the system and are vital to the way Ubuntu operates. You shouldn t add any of these to your new group, and you should never, ever delete any of these user accounts! As with user accounts, deleting a group is simply a matter of highlighting it in the list and clicking the Delete button. You should ensure that the group no longer has any members before doing this because, perhaps surprisingly, Ubuntu won t prevent you from deleting an active group (although it will warn you that this is a bad thing to do). Deleting an active group has the effect of preventing all users who belong to it from logging in. Adding and Deleting Users and Groups at the Command Line You can create new users at the command-line shell by using the useradd command. This command must be run with superuser powers, which is to say that it must be prefaced with the sudo command. The command to add a user is normally used in the following way: sudo useradd -m The -m command option tells the command to create a home directory for the user. Used on its own, useradd merely updates system files with the new user s details and nothing else. There are several other useful command options, which can be discovered by a quick browse of the command s man page.

Leave a Reply