In: Computer Science
What would these commands look like in Kali Linux?
In Kali Linux:
a) Create a user (username= YOUR-FIRSTNAME).
b) Create a file (filename=test) and use chmod command to add the write permission for Others.
c) Use setfacl to remove write permission to YOUR-FIRSTNAME user. Use getfacl to check the file's permissions.
d) Remove YOUR-FIRSTNAME user.
Deliverable(Screenshots from each section if possible please)
a) Create a user (username= YOUR-FIRSTNAME).
Syntax= #useradd –m username
#passwd username
#usermod –a –G sudo username
#cshs –s/bin/bash username
Code =
$ useradd -m YOUR_FIRSTNAME
$ passwd YOUR_FIRSTNAME
$ usermod -a -G sudo YOUR_FIRSTNAME
$ chsh -s bin/bash YOUR_FIRSTNAME
b) Create a file (filename=test) and use chmod command to add the write permission for Others.
Syntax= # touch file_name
# chmod g+w test.txt // + is used to give permission and w is used to write .
$ touch test.txt
$ chmod g+w test.txt
c) Use setfacl to remove write permission to YOUR-FIRSTNAME user. Use getfacl to check the file's permissions.
Syntax= # setfacl -x u : username:w file
#getfacl file name
$ setfacl -x u:YOUR-FIRSTNAME:w file
$ getfacl test.txt
d) Remove YOUR-FIRSTNAME user.
Syntax= # userdel -r username
$ userdel –r YOUR-FIRSTNAME