TCLUG Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [TCLUG:17836] Fun with bash



Dave Sherohman wrote:
> 
> Andy Zbikowski said:
> > Bunch of stuff I got tired of typing:
> >
> > NT droped the Samba connection again...
> > #!/bin/sh
> > umount /mnt/ltiflex/ltirdbms/andyzb
> > sleep 2
> > mount /mnt/ltiflex/ltirdbms/andyzb
> 
> How'd you get that to work?  (Or do you only do it as root?)  I've set up my
> smbmounts with a 'user' param and I'm able to _un_mount them as a normal
> user, but I still have to su to mount them.
> 

sudo
/etc/sudoers
andyzb ALL=NOPASSWD: /usr/local/bin/smb-remount

So type `sudo  /usr/local/bin/smb-remount` 
(I use a GMC launcher on my desktop)

And it runs without asking for a password. 

-- 
Andy Zbikowski, Sys Admin   | http://www.ltiflex.com
LTI Flexible Products, Inc. | "Reality is merely an illusion, 
21801 Industrial Blvd       |  albeit a very persistent one."
Rogers, MN  55374           |  -- Albert Einstein