2.3 Creating user accounts


After installing Calculate Linux Desktop the user guest is in the system. Use this account to explore the OS.

The guest user password can be changed at any time with the passwd command. By default, you can log in remotely, via ssh, as root only.

Changing passwords when installing on multiple computers can be automated. To do so, install the system on the first computer, edit passwords with passwd, then save the /etc/shadow file in your template.

Adding users

Linux manages access privileges quite well. For example, you can limit access to the CD/DVD-drive, the sound card, the scanner and even to the games. To give the user the necessary rights, add them to the relevant system group.

In order to avoid risks, root is not allowed to work in graphical environment. Therefore, you have to temporarily switch to the console by pressing Ctrl+Alt+F1. When prompted, enter root as the login, and then the root's password as suggested. After that, please execute:

/usr/sbin/useradd --create-home --groups users,wheel,audio,cdrom,video,cdrw,usb,plugdev,games,lp,scanner,uucp <login>
/bin/passwd <login>

Any word consisting of letters and numbers is accepted as a login name.

When creating a user you should not create a home directory for them. When you first log into the system, it will be created automatically by the relevant template.

In the example above, a user with access rights to several groups is created, namely:
  • users - to access to the network manager;
  • wheel - to be able to obtain root privileges with the su command;
  • audio - to gain access to your sound card;
  • cdrom - to access to the CD/DVD drive;
  • video - to access to the TV-tuner;
  • cdrw - to be able to write to a CD/DVD;
  • usb - to access to mp3-players, Flash drives, access to USB in VirtualBox;
  • plugdev - to be able to mount USB-devices;
  • games - to access to games;
  • scanner - to access to a scanner;
  • lp - to access to a printer or a MFP-embedded scanner;
  • uucp - to access to the modem.

To return to the graphic password prompt, close your session by typing exit (or pressing Ctrl+d), then hit Ctrl+F7.

Modifying permissions

To add a user to some group, use the gpasswd command. Here is an example of adding a user to the games group:

gpasswd -a <login> games

You may also want to edit /etc/group directly.

Users' migration

When installing or reinstalling Calculate Linux Desktop from an already functional Linux environment, all users and their permissions will be transferred. You'll only need to re-assign passwords with passwd, as described above.

Thank you!