0

How can I use a GUI to edit my sudoers file?
I want to add the nopasswd option without having to learn any vi shortcuts.

RobotHumans
  • 29,530
dileep
  • 1
  • What do you mean using gedit? – w4etwetewtwet Jul 07 '13 at 15:13
  • You cannot install virtualbox using gedit... can you clarify that? Also, if asked for a password to grant administrative privileges, you should be able to just type your password in and continue. If using a command starting with sudo in the terminal, your password will not actually appear, but just type it in and press enter. – Richard Jul 07 '13 at 15:13
  • He's asking for a way to visudo without visudo. It doesn't exist. He's complaining that he has to learn a couple of shortcuts. – RobotHumans Jul 07 '13 at 15:17
  • Feel free to roll-back the edit, but I think it's what you meant. – RobotHumans Jul 07 '13 at 15:23

2 Answers2

1

No there isn't. It doesn't exist. The assumption is that if you're editing the sudoers file that you understand the rammifications of the thing. The requisite is that all people that understand those rammifications actually know how to use vi.

RobotHumans
  • 29,530
1

Instead of a GUI editor, try using nano. While not a GUI, it is more intuitive for new users than vi.

There are a couple ways to get visudo to use the editor of your choice.

1) My preferred method: Set your EDITOR environment variable to point to the path of the editor you wish to use. For a one-off-edit issue the command "export EDITOR=/usr/bin/nano" before issuing the visudo command.

You may also permanently set EDITOR in your shell's profile. Note that using this environment variable method requires sudo to have been built with the --with-env-editor option, which I believe is common on most distros.

2) Modify the sudoers file to contain "Defaults editor=/usr/bin/nano" or substitute the path to whatever other editor you choose.