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.
In the sudoers file, how can I use multiple Tag_Specs on the same line.
Normally if I don't want to ask for a password I will do something like this:
who where = (aswhom) NOPASSWD: commands
I want to use the SETENV tag so that users can preserve environment variables.
Hi,
I am trying to use rsync utility through ssh to synchronize some root files of 2 servers.
I have a rsyncusr user in each server. I configured ssh with no 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.
I've setup a script to do Subversion updates across two servers - the localhost and a remote server - called by a post-commit hook run by the www-data user.
/srv/svn/mysite/hooks/post-commit contains:
sudo -u cli /usr/local/bin/svn_deploy
/usr/local/bin/svn_deploy is owned by the cli user, and contains:
#!/bin/sh
svn update /srv/www/mysite
ssh cli@remotehost 'svn update /srv/www/mysite'
To
I'm trying to set up an Upstart job to run on system startup, and that can also be started/stopped by members of a group other than sudo.
I need to run the SFTP fileserver binary as root, but direct root login is not allowed. In WinSCP, if I use "default" on SFTP server protocol option everything works as expected. Following the instructions to sudo in WinSCP, I tried using "sudo /usr/sbin/proftpd" (works on the command line without any prompts) but it brings up "Cannot initialize SFTP protocol.
I installed oracle for a bit because I thought I was having trouble with openjdk, after a bit of testing it turned out it wasn't openjdk so I switched back and un installed oracle but when I didit still left over the oracle console oracle, visualVM and two other oracle java related links I was just wonder how you get rid of these as well and what I did wrong.
Here's what I did, did I miss somethi
I run ubuntu-12.04 desktop x86_64.
I have a simple script that needs to be accessible from the Desktop and run as root:
$ cat ~/Desktop/flash.sh
#!/bin/bash -
cd ~/tools
sudo ~/tools/fastboot-HW.sh
I've read this and that and that also.