Skip to content

Latest commit

 

History

History
23 lines (21 loc) · 717 Bytes

handson-users-files.md

File metadata and controls

23 lines (21 loc) · 717 Bytes

Create userA and userB and check if the users created

  • useradd [OPTIONS] USERNAME
  • useradd creates a new user account according to the options specified on the command line and the default values set in the /etc/default/useradd
  • The command adds an entry to the /etc/passwd, /etc/shadow, /etc/group and /etc/gshadow files
  • only sudo users can create
sudo useradd userA
sudo useradd userB
sudo cat /etc/passwd

Give userA admin rights

  • With the new user created, it's time to give them sudo rights. For this we'll use the usermod command like so:
sudo usermod -aG sudo userA

Create /operations folder

cd /
mkdir operations

User A must have admin rights on /operations