Sign in to follow this  
Followers 0

Edit sudoer list Debian Wheezy

8 posts in this topic

Posted

Just installed Debain Wheezy on another machine.

 

I'm trying to figure out how to add myself to the sudoer list but when I try using visudo I get some error saying I'm not in the sudoers list.

 

I've been searching around and everything says that I need to edit that file using visudo, which when I look for it in synaptic, nothing shows up, as in it's not installed or even available!

 

So, how do I add myself to the sudoer list?

 

Thank you

Share this post


Link to post
Share on other sites

Posted

How are you calling "visudo"? If you run the command while logged in as root you shouldn't have any issues. Visudo is included with the sudo package, which would be installed by default (my mistake, on many distros it is).

Share this post


Link to post
Share on other sites

Posted

Sudo IS NOT installed by default as I already installed that. Learned that one from previous Debian installs.

 

What I am trying to do is edit the host file, sudo mousepad /etc/hosts

 

Edit:

I just did it the hard way using su though, but still want to add myself to sudoer list.

Share this post


Link to post
Share on other sites

Posted

You're trying to use sudo to add yourself to the sudoers file! You don't yet have permission to use sudo ;).

 

Try "su root' - enter the root password, then add yourself to the sudoers file.

Share this post


Link to post
Share on other sites

Posted

No, I wasn't trying to add myself using sudo!!

 

I found the answer though:

 

 

How to enable sudo for my user account on Debian 6? (still works on 7)

Note:
You will need the root password for this set of commands.

Step1:

Login to a user account.
Step2:

Open a terminal window and type this into your window:1
2 su root
adduser YOURUSERNAME sudo

Step3:

Now reboot, and on your next session you will be allowed to run every program or command, which doesnt belong to you, or you don

Share this post


Link to post
Share on other sites

Posted

No, I wasn't trying to add myself using sudo!!

 

I found the answer though:

 

 

How to enable sudo for my user account on Debian 6? (still works on 7)

Note:

You will need the root password for this set of commands.

Step1:

Login to a user account.

Step2:

Open a terminal window and type this into your window:1

2 su root

adduser YOURUSERNAME sudo

Step3:

Now reboot, and on your next session you will be allowed to run every program or command, which doesnt belong to you, or you don

Share this post


Link to post
Share on other sites

Posted

Already forgot what commands I tried, but just plain su visudo did nothing!

 

Yeah,

I know it isn't junk, as I have used it before, and I worded it rather strongly. I just get frustrated to easily when I have to use the command line. I'm a complete moron when it comes to that!! :(

Share this post


Link to post
Share on other sites

Posted

'su visudo' would attempt to log you in as the user "visudo" :)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0

  • Recently Browsing   0 members

    No registered users viewing this page.