Last active
August 29, 2015 14:26
-
-
Save stevei101/d9dbbdcc735a32234433 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
HOW TO add user stack with passwordless sudo UBUNTU [tested 14.04] | |
$ sudo useradd stack | |
$ sudo usermod -a -G sudo stack | |
$ sudo vim /etc/sudoers.d/myOverrides | |
$ sudo less /etc/sudoers.d/myOverrides | |
stack ALL=NOPASSWD: ALL | |
$ sudo visudo -f /etc/sudoers.d/myOverrides | |
$ sudo su - stack | |
$ whoami | |
stack | |
$ pwd | |
/ | |
$ sudo | |
usage: sudo -h | -K | -k | -V | |
usage: sudo -v [-AknS] [-g group] [-h host] [-p prompt] [-u user] | |
usage: sudo -l [-AknS] [-g group] [-h host] [-p prompt] [-U user] [-u user] [command] | |
usage: sudo [-AbEHknPS] [-r role] [-t type] [-C num] [-g group] [-h host] [-p prompt] [-u user] [VAR=value] [-i|-s] [<command>] | |
usage: sudo -e [-AknS] [-r role] [-t type] [-C num] [-g group] [-h host] [-p prompt] [-u user] file ... | |
$ sudo mkdir -p /home/stack | |
$ sudo chown stack:stack /home/stack | |
logout | |
ubuntu$ sudo su - stack | |
$ whoami | |
stack | |
pwd | |
/home/stack | |
$ sudo -l | |
Matching Defaults entries for stack on devstack: | |
env_reset, mail_badpass, secure_path=/usr/local/sbin\:/usr/local/bin\:/usr/sbin\:/usr/bin\:/sbin\:/bin | |
User stack may run the following commands on devstack: | |
(ALL : ALL) ALL | |
(root) NOPASSWD: ALL |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment