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.

Disclaimer: I'm only decent with EC2 and Unix commands / Linux administration.

Question: How do you give ec2-user the same permissions as root? I'm tired of sudoing.

Why?

I found out that you have to log in to EC2 as "ec2-user". OK, that's fine, except ec2-user doesn't have permissions for a lot of stuff, so I'm always sudoing to install stuff.

I also "su root" after giving root a password with pwd.

There's got to be a better way.

share|improve this question
    
Personally, I find the requirement to use sudo to be a feature, not a bug. It's a reminder that the command you're executing can affect the system rather than just stuff in your own account. (Admittedly the distinction is a bit vague if you're the only use on the system.) –  Keith Thompson Oct 29 '11 at 22:18
    
I think it's a feature too, I'm just not knowledgeable enough at the moment to know when I should be root to install something, vs when I can install it from ec2-user. So I'll just install everything as root...? –  Dave Oct 29 '11 at 22:31
    
My general rule is, anything you can do as a non-root user, you should do as a non-root user. Installing software packages usually requires root, since you need to modify system directories (unless you're installing under your home directory, but on EC2 you probably wouldn't do that anyway). And running an interactive root shell can be an invitation to trouble. –  Keith Thompson Oct 29 '11 at 22:35

1 Answer 1

up vote 2 down vote accepted

You can switch to the root user using:

sudo -i

You don't need to set a password on the root account.

share|improve this answer

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.