Skip to content
basaam0 edited this page Jun 9, 2018 · 1 revision

User creation

Default settings for user creation is found in /etc/default/useradd.

Example of creating a user with the username "jenni" and a new home directory at /home/jenni/

useradd -m jenni

Optional parameters

  • Set a real name: -c "Jennings Zhang"
  • Specify a shell (bash): -s /bin/bash
  • Group: use -U to add as a normal user, or -G wheel to add as an administrator.

Setting a password

passwd jenni

Optionally, populate the home directory after logging in with xdg-user-dirs-update.

User permissions

sudo is used to delegate administrative responsibilities to UNIX users.

https://help.ubuntu.com/community/Sudoers

# let normal user "jenni" use `apt` (on ALL hosts)
jenni  ALL= /usr/bin/apt