I hope I'm not confused...

If I understand your problem, and sudo, my solution would be to configure
sudo so that Pam could run only homenet.sh .

Pam would then type "sudo homenet.sh", and enter her password, and the
shell script could run as root.  If Pam entered sudo anything else, sudo
would give her an error.

Hope this helps..

-- Pat


On Sun, Mar 18, 2012 at 2:21 PM, Rich Shepard <[email protected]>wrote:

> On Sun, 18 Mar 2012, Ken Stephens wrote:
>
> > That second user may need to be the variable %{user} .  Unless you really
> > do have a directory /home/<user>/....
>
> Ken,
>
>   Let me be very specific. In /home/pamela/shell-scripts is the file
> homenet.sh. That file has one line: 'cp /etc/resolv.conf.home
> /etc/resolv.conf'. What I want is to add a line to
> /home/pamela/.bash_logout
> that runs the shell script. Or, more simply, put the one liner in her
> ~/.bash_logout.
>
>   Copying the file in /etc requires root privileges and she does not have
> root permissions.
>
>   I assume that for the command to run in her ~/.bash_logout an entry in
> /etc/sudoers must be made. However, despite how many times I read the sudo
> man page and web pages with examples of the sudoers file I still don't grok
> what that line in /etc/sudoers needs to be so a user can copy one file to
> another in /etc.
>
> Confused,
>
> Rich
>
> _______________________________________________
> PLUG mailing list
> [email protected]
> http://lists.pdxlinux.org/mailman/listinfo/plug
>



-- 
[email protected]
www.timlick.com
503-476-3119
10990 NE Paren Springs Rd.
Dundee OR 97115
_______________________________________________
PLUG mailing list
[email protected]
http://lists.pdxlinux.org/mailman/listinfo/plug

Reply via email to