Cybersecurity Ops with bash - Chapter 17 Solutions
Below are selected solutions for the Chapter 17 workshop questions from Cybersecurity Ops with bash. Note - These are just examples, many possible solutions exist.
Write a Linux command to create user mwilson with the password magic.
Use the useradd command to add a new user in the Linux environment. The -m option is also used to create a home directory for the user.
Next you can set the password for the new user using the passwd command. After entering the command you will be prompted to enter a new password.
Write a Linux command to create the group marketing.
Use the groupadd command to add new groups in the Linux environment.
Write a Windows command to create user frogers with the password neighborhood.
In Windows, the net command can be used to add new users.
Note that the example above illustrates running the command from Git Bash. If you run the command from the Windows command prompt you only need a single forward-slash before add (/add).
You can also use the net command to set the user's password.
Write a Windows command that gives user tjones full permission to the file lyrics.txt.
In Windows the icacls command can be used to manage user permissions.
Note that the example above illustrates running the command from Git Bash. If you run the command from the Windows command prompt you only need a single forward-slash before grant (/grant).