Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

My server is installed by my provider with a default user (root and another user, lets say here johndoe). I lack some experience to know if everything is well set. Let's say I add the group admin. Then I need to add johndoe to this group. I end up with the following when I read /etc/group :

...
**johndoe**:x:1000:
...
admin:x:1001:**johndoe**

This numbers, with the letters… I just don't have a clue. The admin's group is set with the following :

%admin ALL=(ALL)       ALL

I need to give johndoe the most privileges possible; do I have anything else to do? Hope my question is not too random.

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

Understanding that %admin ALL=(ALL) ALL is in /etc/sudoers file, there are three ways of gaining root privileges:

  1. In order to execute a command with root privileges you should run sudo command.

  2. To open a shell with root privileges but environment variables from johndoe you can invoke sudo -s.

  3. Also, if you really want to run a root console (with environment variables of root user) you can execute sudo su - and you will have a root shell.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.