-
Notifications
You must be signed in to change notification settings - Fork 29
Expand file tree
/
Copy pathShell-Commands-part3
More file actions
23 lines (18 loc) · 830 Bytes
/
Shell-Commands-part3
File metadata and controls
23 lines (18 loc) · 830 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
Here i am creating a user as devops and a group as devops.Also deleting them .
adduser devops : add a user to the system.
usermod devops --password devops : modify a user account.
usermod -a -G Group-name user-name --> Add user to grup
groupadd devops : add a group to the system.
userdel devops : delete a user account and related files.
groupdel devops : remove a group from the system
chage devops : change user password expiry information.
Relevant files which will change when user/group is created/modified.
cat /etc/passwd
cat /etc/shadow
cat /etc/group
Assignment :
1. Create a group named as demo .
2. create a user with your name in the group demo .
3. Using chage command change the password for your user.
4. Create a user with directory assigned as /var/lib.
5. View the content in /etc/passwd and /etc/group