Overclock.net banner

1 - 10 of 10 Posts

·
Premium Member
Joined
·
5,543 Posts
Discussion Starter #1
so when i do a sudo apt-get xxxxxxxxx
it asks me for my password. when i enter it. it says xxxxx is not in the sudoers file. this incident will be reported.

fixes?
 

·
Premium Member
Joined
·
5,543 Posts
Discussion Starter #3
i tried that i get the error

"User is not in the sudoers file. This incident will re reported."

I've also tried:
su -echo 'user ALL=(ALL) ALL' >> /etc/sudoers

that also gave me the same error
 

·
Banned
Joined
·
2,407 Posts
Is this for your fedora system? Root and your account are separate accounts.

Try su -c to get root privileges.

Or, you can edit your sudo privileges with visudo and add your account name under [ALL]
 

·
Registered
Joined
·
3,124 Posts
The recommended way to do this is to use visudo to edit the file.

But I always use nano or gedit, but just to uncomment the wheel group code. Then just add yourself to the group wheel and you have sudo abilities.
 

·
Banned
Joined
·
2,407 Posts
I'm not a huge fan of vi myself but this edit is so basic you might as well use it. I prefer gedit myself for most file editing but I'm trying to use nano more.

Anyway, just open visudo as root.

Then move the cursor down to the line beneath:

Code:
Code:
root    ALL=(ALL) ALL
Hit Ctrl-I and type your user name, tab over and copy the "ALL=(ALL) ALL" bit.

Hit Ctrl-I again and I think to save is Ctrl-ZZ

Done. Simple edit. I don't know why the recommend vi but for such a simple edit, you might as well just go with what they recommend.
 

·
Registered
Joined
·
3,124 Posts
Quote:


Originally Posted by TFB
View Post

I'm not a huge fan of vi myself but this edit is so basic you might as well use it. I prefer gedit myself for most file editing but I'm trying to use nano more.

Anyway, just open visudo as root.

Then move the cursor down to the line beneath:

Code:
Code:
root    ALL=(ALL) ALL
Hit Ctrl-I and type your user name, tab over and copy the "ALL=(ALL) ALL" bit.

Hit Ctrl-I again and I think to save is Ctrl-ZZ

Done. Simple edit. I don't know why the recommend vi but for such a simple edit, you might as well just go with what they recommend.

They recommend editing with visudo because improper syntax in the sudoers file can lead to some serious issues, like the root account not not having root privileges. Visudo does a syntax check before writing to the file for that reason.
 

·
Registered
Joined
·
3,124 Posts
Quote:


Originally Posted by TFB
View Post

LOL. Who would strip root privs from root?

Nobody. Its not an intended effect of sudo, but if something goes wrong in the right way, it can happen. Visudo is a safety net.
 
1 - 10 of 10 Posts
Top