[sudo-users] NOPASSWD: fails when using -i option
Marcel Kuiper
sudo at mknet.nl
Wed Jul 4 03:52:56 EDT 2012
> The -i flag, when used by itself, runs the target user's shell in
> login mode. When a command is specified along with -i, that command
> is run via the target user's shell in login mode.
>
> This is the only way to have the user's startup files (e.g.
> .profile) be read before the command is executed.
>
> You should be able to use a sudoers rule like this:
>
> %mygrp ALL=(otheruser) NOPASSWD: /bin/sh -c /path/to/script.sh
>
> - todd
>
I tried that already on my debian and it didn't work (version
1.7.4p4-2.squeeze.3) . I just checked on my Ubuntu and there it does work.
Thnx
Regards
Marcel
More information about the sudo-users
mailing list