FN-GM Posted February 16, 2009 Posted February 16, 2009 Hi Im just dipping my toe into the Linux world. I have installed Ubuntu server in a VM on my mac. Install went fine and i like how good it was i could install Lamp during the install. I would like to set a root password, during the install i did not set one. What is the default password? Thanks Z
RabbieBurns Posted February 16, 2009 Posted February 16, 2009 open up terminal form the applications menu just do "sudo passwd" and it should get you to create a root password
localzuk Posted February 16, 2009 Posted February 16, 2009 To expand a bit, Ubuntu doesn't enable root by default, but gives the initial user sudo privileges. So, you can make use of sudo to set a root password if you need to, but ideally, you shouldn't need to. 1
FN-GM Posted February 16, 2009 Author Posted February 16, 2009 Thanks, i get you. Getting my head around linux will be a big learning curve.
SteveMC Posted February 16, 2009 Posted February 16, 2009 To expand a bit, Ubuntu doesn't enable root by default, but gives the initial user sudo privileges. So, you can make use of sudo to set a root password if you need to, but ideally, you shouldn't need to. And if you find yourself having to type a long sequence of commands that all need super-user (otherwise known as 'su' or 'root') privileges, you can type: sudo -s Which will switch you to the root user until you type exit Stephen 1
powdarrmonkey Posted February 17, 2009 Posted February 17, 2009 is that the same as "su -" ? Yeee-no. Kinda. It effectively gives you the same power as su, but doesn't spawn a new login shell and replace your environment variables, doesn't need you to know (or share) the root password, only allows allowed commands to be executed, etc. But to all intents and purposes, unless you share the machine with somebody else, yes. 1
kesomir Posted February 17, 2009 Posted February 17, 2009 I use sudo su to switch to root and then passwd to set the root password.
RabbieBurns Posted February 17, 2009 Posted February 17, 2009 Yeee-no. Kinda. It effectively gives you the same power as su, but doesn't spawn a new login shell and replace your environment variables, doesn't need you to know (or share) the root password, only allows allowed commands to be executed, etc. But to all intents and purposes, unless you share the machine with somebody else, yes. Thanks, learn something new every day
unixman Posted February 17, 2009 Posted February 17, 2009 To expand a bit, Ubuntu doesn't enable root by default, but gives the initial user sudo privileges. So, you can make use of sudo to set a root password if you need to, but ideally, you shouldn't need to. This is not completely accurate. The root account is not disabled; it has an invalid password hash, so that the authentication process will fail.
sparkeh Posted February 17, 2009 Posted February 17, 2009 This is worth a read to learn about Ubuntu/root/sudo: RootSudo Explains why Ubuntu does it like this, when to use sudo, gksudo and sudo -i HTH
srochford Posted February 17, 2009 Posted February 17, 2009 Thanks, i get you. Getting my head around linux will be a big learning curve. It might even be worth it :-) The sudo stuff is a bit like "run as administrator" in Vista; sudo -s is like running a command prompt as administrator.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now