Instruction: all paths should be in absolute paths and all commands must be run as sysadmin users, it shouldn't run as a root user. Questions Q01) Create a folder named FinalTest under the root of the Linux file system. Q02) Change the ownership of the FinalTest folder to user sysadmin and group sysadmin. Q03) Set the permissions on the FinalTest folder so that: - users that are not a sysadmin and not in the sysadmin group would be able to move into the folder as well as to view and create folders in that folder.
Instruction:
all paths should be in absolute paths and all commands must be run as sysadmin users, it shouldn't run as a root user.
Questions
Q01) Create a folder named FinalTest under the root of the Linux file system.
Q02) Change the ownership of the FinalTest folder to user sysadmin and group sysadmin.
Q03) Set the permissions on the FinalTest folder so that:
- users that are not a sysadmin and not in the sysadmin group would be able to move into the folder as well as to view and create folders in that folder.
- only the owners of files/folders be able to delete files/folders that are in that folder.
Q04) Use the sysadmin user and the output redirection to create a text file named grep-man in the FinalTest folder that would contain the help documentation for the grep command.
Q05) Change the permissions of the grep-man file so that the user can read, write, and execute, the group can read, and the others can read and execute content.
Answer:
a) using letters:
b) using octal values:
Q06) Create a symbolic link to the grep-man file. The symbolic link must be created in the home directory of the sysadmin user. Please remember that the grep-man file is located in the previously created FinalTest folder.
Q07) Write a command that would create a new user account. Use the information below when creating the new user account and ensure that the account home directory is made for the new user account:
- name: Jack2020
- user id: 333
- primary group: Jack2020
- comment: user account for comp3044 final test
- default shell: /bin/bash
Q08) Write a command that will assign the created in Q07 user account to supplementary group named sudo.
Q09) Write a command that would make a copy of the grep-man file. The name of the new file should be grep-man-copy and it should be stored in the /root directory.
Q10) Write a single command that would remove the previously created FinalTest folder and its content as well as the grep-man-copy file.
Step by step
Solved in 3 steps with 3 images