[Tfug] Running logout scripts as root?

John Gruenenfelder johng at as.arizona.edu
Sat Aug 9 16:52:09 MST 2008


On Sat, Aug 09, 2008 at 03:37:45PM -0700, Christopher Robbins wrote:
>   I've got a logout script that I've written...It connects to a SMB file
>   share (via mount-cifs) and then uses rsync to sync the directories.
>   I'm using this as a way for my users to access their files offsite -
>   they
>   connect to the SSH server, copy files, then when they logout, we sync
>   their file shares to this SSH server.
>   Problem is...one needs to be root to run mount.  Aside from adding
>   my list of users to sudoers or giving everyone access to mount, is
>   there
>   an easy way to have the script executed as root?
>   TIA
>       -  Chris

If the share can be specified in /etc/fstab, you can add the 'user' option
which will allow users to mount/unmount that particular item.  Of course, if
you're mounting something like smb:/users/bob/ (I don't know what the proper
SMB/CIFS mount syntax is) then this may or may not work depending on how many
users you have.


-- 
--John Gruenenfelder    Research Assistant, UMass Amherst student
                        Systems Manager, MKS Imaging Technology, LLC.
Try Weasel Reader for PalmOS  --  http://weaselreader.org
"This is the most fun I've had without being drenched in the blood
of my enemies!"
        --Sam of Sam & Max




More information about the tfug mailing list