top of page
book of spells.webp

Start your journey towards mastering the CLI with our FREE Command Line Book of Spells.

By entering your email address you agree to receive emails from Command Line Wizardry. We'll respect your privacy and you can unsubscribe at any time.

  • Writer's pictureCybersecurity Ops with bash

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.


Question 1


Write a Linux command to create user mwilson with the password magic.


Answer


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.



 

Question 2


Write a Linux command to create the group marketing.


Answer


Use the groupadd command to add new groups in the Linux environment.



 

Question 4


Write a Windows command to create user frogers with the password neighborhood.


Answer


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.



 

Question 5


Write a Windows command that gives user tjones full permission to the file lyrics.txt.


Answer


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).


254 views0 comments

Recent Posts

See All
bottom of page