New answers tagged sudo
My first thought was to do this via PAM, similar to how LDAP is integrated into PAM via pam_ldap or somesuch, but I can't find anything that will let me use IAM as an auth backend I think you are thinking about this the wrong way round, try to extend your domain into IAM for a start so that users are logging into AWS with their domain credentials ...
We ended up continuing with pwdx with sudo access as other options were more or less 'complicated' as this one.
I may be wrong, but I believe that sudoers also restricts parameters that can be passed to a command/script, not just the command itself. If you try to run your .sh without the parameter it will likely work e.g. sudo /bin/bash /var/www/my_bash_script.sh So, to tell sudoers to allow that script to be run with any parameters (by apache), you would need ...
You can use the following settings Cmnd_Alias SVNUP = /root/webhooks/svn_update.sh apache ALL=(ALL) NOPASSWD: SVNUP Create simple test script # cat test.sh #!/bin/bash set -u echo "Param1: $1" Make simple tests $ id alex uid=506(alex) gid=506(alex) groups=506(alex) $ cat /root/webhooks/test.sh cat: /root/webhooks/test.sh: Permission denied $ sudo ...
Sudo has something called sudoreplay when enabled sessions is logged and can be replayed later, works similar as the script command that make a typescript of terminal session that later can be replayed with the scriptreplay command.
Reading error messages is hard: sudo: /etc/sudoers.d is world writable You have incorrect permissions on the /etc/sudoers.d directory. That directory should not be world writeable (if you allow that (and sudo would accept it) then any user can grant themselves sudo privileges, which is a Bad ThingTM) Fix that! [sudo] password for daemon: Hmmm. Your ...
That first sudoers configuration with sensu ALL = NOPASSWD: /etc/sensu/handlers/puma_restart.sh will not do what you want. That assigns rights for the sensu user to invoke the wrapper puma_restart.sh script with sudo. The sudo commands though are inside that script and invoking bash to execute commands. You'd need to allow the sensu user to invoke bash via ...
Turns out it works if I run the command and specify the location exactly: sudo /usr/local/bin/composer self-update
Try sudo 'echo "127.0.0.1 db-local.internal" >> /etc/hosts' The way you written it, you will try to append the output of sudo to /etc/hosts before the sudo becomes active.
Top 50 recent answers are included