So we could circumvent this by installing sudo and adding our own user to the sudoers group. Let's see which groups we already belong to:
Code: Select all
bbq@grill:~$ groups
bbq lp dialout cdrom floppy sudo audio dip video plugdev users fuse netdev storage power
To add our user to a certain group, we need to go into the root account first:
Code: Select all
bbq@grill:~$ su -
Code: Select all
root@grill:~# groups bbq
Code: Select all
root@grill:~# addgroup monsterpenis
Adding group `monsterpenis' (GID 1003) ...
Done.
addgroup monsterpenis
Code: Select all
root@grill:~# adduser bbq monsterpenis
Adding user `bbq' to group `monsterpenis' ...
Adding user bbq to group monsterpenis
Done.
Let's say, the group 'sudo' should be able to run every command without ever needing to enter the password. Dangerous? Yeah. Convenient? Fuck yeah :D Start the visudo, which is (originally) a VI frontend for editing the sudoers file:
Code: Select all
root@grill:~# visudo
Code: Select all
# Allow members of group sudo to execute any command
Code: Select all
%sudo ALL=(ALL)NOPASSWD: ALL
Code: Select all
root@grill:~# exit
Code: Select all
bbq@grill:~$ groups
bbq lp dialout cdrom floppy sudo audio dip video plugdev users fuse netdev storage power
Code: Select all
bbq@grill:~$ fdisk
bash: fdisk: command not found
bbq@grill:~$ sudo fdisk
Usage: fdisk [OPTION]... [DEVICE]
bbq@grill:~$
Of course (!) this is absolutely not recommended, don't ever even mention you saw this anywhere. We're just lazy bastards. Or at least I am.