su - root problem

3 replies [Last post]
dynamiteboy
User offline. Last seen 47 weeks 6 days ago. Offline
Joined: 08/29/2009


I have Ubuntu 9.04 installed on a partitioned hard drive (x86 system). I'm trying to do su - root. It asks for password, which I set at installation, and have verified, but it won't accept the password. I tried not using a password, same results.

When I type my password, nothing is displayed on the screen. No characters, no dots, nothing. My suspicion is either a bug or a bad install, but I'm hoping to avoid doing a full re-install. Any help will be greatly appreciated.

FWIW- This is all part of me trying to install LAMP on my computer. Need to login as root to install PHP libraries, unless someone knows a better method. But I think I should still learn how to log in as su anyway.

Thanks,

Mike


dynamiteboy
User offline. Last seen 47 weeks 6 days ago. Offline
Joined: 08/29/2009

Okay, Here's an update. I discovered that I could get around my problem with the following:

sudo su - root

Is that how it's supposed to be, or is something wrong?

Thanks,

Mike

Ali Ross
User offline. Last seen 8 weeks 6 days ago. Offline
Joined: 08/09/2008

Hey Mike,

 Yes - that's how it's supposed to be. Once you understand the concept of security in Ubuntu you'll find it's better than just having a root account. Basically, everything goes through sudo, so it's all logged and secure. You don't actually have a root password (well, unless you hack it up), you just have user passwords in Ubuntu with the ability to sudo from certain allowed accounts in /etc/sudoers.

I tend to just use sudo [command] before each command so that I don't make stupid goofs like rm -rf / as root :), however if I need to run a lot of root based commands then I use sudo -s these days as it retains the shell details correctly, thus it's better than sudo su -.

Hope this helps,

Ali

Ali Ross
User offline. Last seen 8 weeks 6 days ago. Offline
Joined: 08/09/2008

Mike,

 Have a look at this linuxtoday tip on Ubuntu security and why enabling root is a no-no:

http://www.linuxtoday.com/security/2009083100735OPUB

Hope this helps,

Ali