I think that sudo is become a wide used command with Ubuntu, where you don’t even have a root password, before that probably it was used only in some data-centers to restrict access to some commands.
sudo allows a permitted user to execute a command as the superuser or another user, as specified in the sudoers file.
First, I am NOT looking for rock star security. We just at a glance want to prevent "sudo su -" and it is a policy here to always use sudo when running commands and we all want that. Ideally we would like to log something if someone does try "sudo su -" to please obey the culture and never become root so we can reverse engineer all commands run and what happened.
Beside the usual setup where I create a normal user foo, I want to run a few
d-i preseed/late_command commands as that foo user.
My initial thought was to simply call those commands with sudo, e.g:
d-i preseed/late_command in-target echo "<pwd>" | sudo -Si <command>.
This works for some sort of commands.
I would like to permit all my users to shut down or reboot the machine so i did the following changes issuing sudo visudo:# User privilege specificationroot ALL=(ALL) ALLsparky ALL=(ALL) ALL # Oh yeah iam a sudorer!ALL ALL=NOPASSWD: /sbin/shutdown# Allow members of group sudo to execute any command# (Note that later entries override this, so you might need to move# it further do
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.
The utility sudo runs executables as root or another user. The command cd is not an executable, it is command that is built into the shell so you can not run it via sudo. [by hawkmage]
I've set up sudo not to prompt for password by editing the sudoers file:
myuser ALL=(ALL:ALL) NOPASSWD: ALL
And it works fine, running sudo with no password prompting. But when entering sudo -v I noticed that it prompted for password, only once.
I would like to be able to use the sudo command in a chroot environment.
I start the chroot as follows:
chroot /debian-squeeze /bin/bash
Now I'm logged in as root in the chroot. I can do su user to log in as a user named user.
Terminal won't input password when I/it asks for it.
I am trying to install wine through terminal.