3

After reading the following two posts:

Trying to install an openVPN GUI messed up sudoers

Standards accounts are able to get root access using sudo without password request

I would like to learn how to perform a backup of /etc/sudoers file so that I can restore it in the event of a mess-up after installing a non-Ubuntu-package-ready software.

Any help would be much appreciated.

n00b
  • 1,897

2 Answers2

4

To backup:

sudo cp /etc/sudoers /etc/sudoers.backup

To restore:

sudo rm -rfv /etc/sudoers && sudo mv /etc/sudoers.backup /etc/sudoers
Daniel M.
  • 1,903
0

If /etc/sudoers is going to be a problem you probably should just keep all of /etc in version control since they're just some text files. Check this out:

Jorge Castro
  • 71,754
  • Thanks for your reply but I am still clueless after reading the page referenced by your URL. I do not know what "version control" and "git" mean. I am new to Ubuntu and yes, I am not an IT guy. I just wish to have a simple method of backing up /etc/sudoers file. – n00b Jul 09 '13 at 02:58