Adding a User for Daily Use
Working as root on a Unix/Linux system is dangerous and should be avoided
as much as possible. Therefore it is strongly recommended to add a user
for day-to-day use.
The groups the user is member of define what activities the user can perform.
The following table lists a number of important groups you might wish to use:
| Group |
Description |
audio
be able to access the audio devices
cdrom
be able to directly access optical devices
floppy
be able to directly access floppy devices
games
be able to play games
usb
be able to access USB devices
video
be able to access video capturing hardware and doing hardware
acceleration
wheel
be able to use su
For instance, to create a user called john who is member of the
wheel, users and audio groups, log in as root first
(only root can create users) and run useradd:
Login: root
Password: (Your root password)
# useradd -m -G users,wheel,audio -s /bin/bash john
# passwd john
Password: (Enter the password for john)
Re-enter password: (Re-enter the password to verify)
If a user ever needs to perform some task as root, they can use su -
to temporarily receive root privileges. Another way is to use the sudo
package which is, if correctly configured, very secure.