Ubuntu Unleashed 2019 Edition: Covering 18.04, 18.10, 19.04

(singke) #1
root@seymour:~# mount   -o  rw,remount  /

NOTE
You now have complete root access and read/write privileges on the
machine. This is an example of why security of a physical machine is
important. If someone has physical access to your computer and knows
what he or she is doing, that person can easily and quickly gain full control
over the machine and all it contains.

If the problem exists because the user account was removed from the admin
group, enter the following:


Click here to view code image
root@seymour:~# adduser username admin


If the problem exists because the permissions for /etc/sudoers are
wrong, enter this:


Click here to view code image
root@seymour:~# chmod 440 /etc/sudoers


If the problem exists because of an internal problem in /etc/sudoers,
make a backup of the existing file and use visudo to edit it. (This is a
special use of the vi editor, covered in Chapter 12, “Command-Line Master
Class, Part 2,” that runs a check on the file after editing to be certain it is
correct; this particular problem usually occurs when someone edits the file
using another editor that does not make this check.) The contents of the file
should be as follows:


Click here to view code image



This file MUST be edited with the 'visudo' command as root.



Please consider adding local content in /etc/sudoers.d/ instead of


directly modifying this file.



See the man page for details on how to write a sudoers file.



Defaults env_reset
Defaults
secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"


#   Host    alias   specification

#   User    alias   specification

#   Cmnd    alias   specification
Free download pdf