Mounting a drive - not using fstab or root

David Ryder davaweb at bigpond.net.au
Thu May 29 23:57:23 BST 2008


On Fri, 2008-05-30 at 04:51 +1000, banewman at supernerd.com.au wrote:

> 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

        1. Sorry to be a pain - in sudo gedit / gksu gedit I can type
        the line bit it wlll not allow me to save - only 'save as' -
        save is greyed out on the toolbar and file menu. Yes, definitely
        editing as sudo.

        2. Also, would the line:
        myusername this-computername ALL =
        NOPASSWD: /bin/mount, /bin/umount
        be better?

        3. I deleted /etc/.sudoers.tmp.swp and no longer get the error
        message when opening in vi. Somewhat getting freaked out at how
        it seems potentially lethal to edit!

Thanks Mons for the cheat sheet.

Thanks for help on this ...

David




More information about the ubuntu-au mailing list