Adding user accounts

Updated 13 March 2019

Users

When you have installed Calculate Linux Desktop, the user present on the system by default is guest. Используйте его учётную запись пользователя для знакомства с системой.

Пароль гостевого пользователя можно в любой момент изменить с помощью утилиты passwd. Удаленный доступ к компьютеру (по протоколу ssh) разрешён только для пользователя root.

Adding a user

Permissions to system devices are defined using groups. For example, you can restrict access to CD / DVD-drive, sound card, scanner or even games. To add the necessary access rights, add the user in the corresponding system groups.

For security reasons, root is not allowed to work in a graphical environment. Therefore, you have to switch to the command line by hitting Ctrl + Alt + F1 when you need to manage accounts. На приглашение ввести логин введите root++, а затем пароль. Now run the following:

useradd --create-home --groups users,wheel,audio,cdrom,video,cdrw,usb,plugdev,games,lp,scanner,uucp [HTML_REMOVED]

passwd [HTML_REMOVED]

Replace [HTML_REMOVED] with any string of Latin letters and numbers.

Note

Whenever you add a user account, do not create a home directory for them. При первом входе в систему она создается автоматически с учетом настроенного шаблона пользователя.

In the example above, you create a user with access rights to several groups:

  • users provides access for the network manager;
  • wheel - возможность получать привилегии суперпользователя, используя команду su;
  • audio - доступ к звуковой карте;
  • cdrom, to the CD/DVD drive,
  • video, to the TV tuner;
  • cdrw allows to write to CD/DVD media;
  • usb - доступ к mp3-плеерам, флеш-накопителям, а также доступ к USB в VirtualBox;
  • plugdev allows to mount USB media;
  • games makes gaming accessible;
  • scanner enables to scan documents;
  • lp gives access to a printer or a MFP-integrated scanner;
  • uucp allows to use a modem.

To return to the graphical password prompt, exit the session with the exit command, or by hitting Ctrl + D. To return to the graphical session, press Alt + F7.

Editing access privileges

Чтобы добавить созданного пользователя в группу, воспользуйтесь командой gpasswd. Example: add a user to the games group:

gpasswd -a [HTML_REMOVED] games

The group access rights are stored in /etc/group.

Transferring users

Should you install or reinstall Calculate Linux from a running Linux system, all users will be copied to the new system with their access rights. It will only be necessary to re-assign passwords to them using the passwd utility, as described above.