Getting ready

Besides having a terminal open, we need to remember a few concepts:

  • sudo requires a password (unless specified)
  • sudo can also be limited to specific commands, users, or hosts
  • sudo commands are also logged in either /var/log/secure or /var/log/auth.log:
Dec 23 16:16:19 moon sudo: rbrash : TTY=pts/2 ; PWD=/home/rbrash/Desktop/book ; USER=root ; COMMAND=/usr/bin/vi /var/log/auth.log
Dec 23 16:16:19 moon sudo: pam_unix(sudo:session): session opened for user root by (uid=0)

Additionally, we can create a new user for this recipe:

$ sudo useradd bob
$ sudo passwd bob #use password
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.224.15.170