>> 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
>>     
> Thanks Paul. This *seems* easy to me - but when I type ?sudo visudo ...
>   
Hi David
          Vi can be confusing - the commands to write out the file are 
normally shown down the bottom of the open file - ctrl+o to write, 
ctrl+x to exit.
    But having said that I have had visudo lock me out on occasions even 
though there was only one user on the system which seems to be your 
situation. You might be better off typing in a terminal -
gksu gedit /etc/sudoers
- (assuming that gedit is your text editor off choice)
and adding to the bottom of the file the line -

myusername ALL = NOPASSWD: /bin/mount, /bin/umount
It's not the accepted method but when visudo locks out the only user on the 
comp there is no alternative.
        Hope it helps
        Paul




-- 
ubuntu-au mailing list
ubuntu-au@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-au

Reply via email to