-
Notifications
You must be signed in to change notification settings - Fork 5
/
Challenge_05
27 lines (21 loc) · 863 Bytes
/
Challenge_05
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
1. Create a new user, set his password and login as that user in the terminal.
Sol.
sudo useradd Eddie
sudo passwd Eddie
su Eddie
2. Create a new user using the useradd specifying the following: the home directory (which will be created as well), the Bash shell and a comment.
Create a new group using the groupadd command and then add the user to the newly created group.
Check the groups to which the user belongs.
Sol.
sudo groupadd grp
sudo useradd -m -c "New User" -s /bin/bash -G grp U1
sudo passwd U1
groups U1
3. The user created above is unable to view the contents of /etc/shadow file even with the sudo command. Identify the issue and try to solve it.
Sol.
sudo usermod -aG sudo U1
4. Remove all the groups and users created above and also delete their home directories.
Sol.
sudo userdel -r Eddie
sudo userdel -r U1
sudo groupdel U1