User Management — Linux Fundamentals Module — HTB Walkthrough
TIER 0 MODULE: LINUX FUNDAMENTALS
SECTION: User Management
For this section, you necessarily do not need to connect to the pwnbox.
If you are not registered in HTB Academy, then use this link to register now: https://referral.hackthebox.com/mzxKOJt
1. Which option needs to be set to create a home directory for a new user using “useradd” command?
You simply just need to see the manual page of the useradd
command.
man useradd
Look for anything that mention home directory…
And we got the answer!
Answer: -m
2. Which option needs to be set to lock a user account using the “usermod” command? (long version of the option)
Again, see the manual page of the usermod
command.
man usermod
Look for something similar to ‘lock’.
And we got the answer!
Answer: --lock
3. Which option needs to be set to execute a command as a different user using the “su” command? (long version of the option)
Again, see the manual page of the su
command.
man su
Look for anything related to command and different user. (nothing found)
When you want to run command as a different user, you are already doing a su
which means ‘switch user’. The only thing we need to tell the CLI is we need to run a command.
So either we use -c
or --command
, but HTB required the long version of the flag.
Answer: --command
☣️ HAPPY ETHICAL HACKING ☣️
DISCLAIMER: THIS CONTENT DOES NOT BELONG TO ME, I AM JUST WRITING A WALK-THROUGH OF A FREE MODULE OF HACK THE BOX ACADEMY. (WRITING WALKTHROUGHS OF FREE MODULES IS PERMITTED BY HTB ACADEMY)