> Date: Wed, 28 May 2008 09:27:12 +1000 > From: David Ryder <[EMAIL PROTECTED]> > Subject: Mounting a drive - not using fstab or root > To: Ubuntu-au mailing list <ubuntu-au@lists.ubuntu.com> > Message-ID: <[EMAIL PROTECTED]> > Content-Type: text/plain; charset=UTF-8 > > Hi, > HARDY > I have a drive which at various times in the day and week, I want to > mount/umount, via cron and a script, in ?/media or another > folder /media/this-drive-folder/. Because I want to use different > folders at different mount times (for valid business reasons) the drive > can not be in fstab, as I understand it, because then I would not have > the choice of which folder to mount it in. > > But - mount wants root only to mount. I think users can mount fstab > drives if noauto, user (or suid using sudoers?) are used but that does > not overcome my mount location needs. > > So, the crux of all this is, is it possible to mount an ntfs drive that > is not in fstab, as a user in a script, without needing sudo? > > Thanks, > David > > > > > > Hi David, The only way I know to do what you're trying to do is to add a line in /etc/sudoers for the user that will be mounting the drive. Using the command - sudo visudo - in a terminal you can add the line - [username] ALL = NOPASSWD: /bin/mount, /bin/umount where [username] is the users' login name. The user will need admin rights and you will still need to have sudo mount in you're script but it won't ask for a password. Hope it helps. Paul
-- ubuntu-au mailing list ubuntu-au@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-au