Websites tell me to use sudo when I have no password, usually tell me one of two things.
It is bad security
Or use 'sudo visudo' and the %admin ALL=(ALL) NOPASSWD: ALL line
I would like to not have a password on anything despite the security risks.
Going with option 2, I'm trying to avoid getting prompted to enter a password at all on my account.
So the problem with option 2, is that sudo is
In /usr/local/bin I've the following script called sdown
/usr/local/bin$ cat sdown
#!/bin/bash
if [ $# -lt 1 ];
then
echo "no time set"
else
sudo shutdown -h $1
fi
Permssions are 788: -rwxr-xr-- user user sdown
The point is if I run the script it's prompting for the sudo password:
/usr/local/bin$ sdown 13:37
[sudo] password for user:
Just to make my life even better I'd like to avoid
I visudoed sudoers to allow a user to run one bash script with a passwordless sudo, which works fine when logged in (also via SSH). However, when I log in via SSH using public key authentication and configure authorized_keys' command="sudo myScript", I am promped for the user password by sudo. Having the script itself use sudo on another program does however work without requiring a password.
When I create new Ubuntu 12.10 instances, I typically bootstrap them by manually SSHing onto the machine and editing the sudoers to put a NOPASSWD on the default user (e.g., ec2-user, azureuser, etc.). Then my install scripts can sudo various commands without having to provide a password.
I don't have anything against passwords.
Terminal won't input password when I/it asks for it.
I am trying to install wine through terminal.
I have two users on my system: itsadok, my main user, and elasticsearch, a user with a different ulimit for running ElasticSearch.
I would like to be able to run stuff as the secondary user without being prompted for password every time.
Hi,
I have installed sudo on Solaris 10 (sparc). When I try to add a user I get the following:
----------------------------------------------------------
-bash-3.00$ sudo addusr scarlet sudo
sudo: /usr/local/etc/sudoers.d is owned by uid 2, should be 0
Password:
-----------------------------------------------------------
I entered a password, thinking it was for the sudo user but it failed.
For example, I can use ssh-id-copy to get the key and login to the remote server without entering the password.
Is there a similar mechanism to run as root without prompting password?
I don't know. If login with a key is sort of safe, then I argue there should be a mechanism like that for sudo. NOPASSWD is not a good solution, however.
Thanks.
Whenever I try to do anything at all that requires my password it returns this:
u7ur7l3@ubuntu:~$ sudo
sudo: /usr/lib/sudo/sudoers.so must be owned by uid 0
sudo: fatal error, unable to load plugins
u7ur7l3@ubuntu:~$
So I can't install anything from the Software Center / package manager or run any commands in terminal that require my password.