03 User Management

/etc/passwd

etc passwd

 

username: password:UID:GID:comments: home dir: shell

password are stored in etc shadow

 

Shell

shell

 

user@computernamea:~$ cat /etc/shells
# /etc/shells: valid login shells
/bin/sh
/bin/dash
/bin/bash
/bin/rbash
/usr/bin/screen

/etc/shadow

etc shadow

useradd -c “COMMENT”

-m create the home direcgory

-s /shell/path  the path to the isers’ shell

passwd username

 

tail -1 /etc/passwd

/etc/skel

etc skel

Use -u to specify the UID

Use -u to specify the UID

 

userdel -r usename

usermod [options] username

 

/etc/group

groupadd

groupdel

groupmod

 

su -c

whoami

sudo

using sudo

 

visudo edit the /etc/sudoers file