Ubuntu keeps track of all the group information in the /etc/group file. This file has each group on a separate line, using the format:
The group file contains four data fields, each separated by a colon:
♦ A password, if assigned to the group
♦ A comma-separated list of user accounts that belong to the group
Because Ubuntu doesn't use a specific root user account to administer the system, keeping at least one user account in the admin group is a must. If you accidentally remove all of the users from the admin group, no one will be able to add software patches or updates, add new users, or even move users to other groups.
If this happens to you, don't worry, there's a solution. Just follow these steps to get things back to normal:
1. Boot your workstation using the Ubuntu LiveCD.
2. Mount the workstation hard drive on the LiveCD's virtual file system.
4. Use the command-line navigation commands (discussed in Chapter 19, "The Ubuntu Command Line") to navigate to the mount point of the workstation hard drive, then to the / etc folder on the hard drive.
5. Use a text editor to open the group file.
6. Find the admin group and add a username from your system onto the line. To append a value to a line in the vi editor, use the A command.
7. Exit and save the file.
8. Reboot the workstation and let the normal Ubuntu installation on the hard drive boot.
Once you've added the username to the admin group, it should have administrator privileges on the workstation.
Was this article helpful?