Monday, May 16, 2011

Enable and disable root password (Ubuntu/Debian and others)

Some say that using root all the time is wrong. I never had a problem because of that, but well, the distros have adapted to not allowing a root login by default (well, this is not exactly true but it's the default behavior).

So, you can enable again your root login by doing a:

sudo passwd root

And disable it again with a:

sudo passwd -l root

which locks the root account.

And if you have the root account locked, you can become root by typing:

sudo -i

Stupid, I know, but it's the better way (I was found myself doing a sudo bash and that is more or less, wrong).

Cheers

No comments:

Followers

About me

Santa Fe, Argentina
Programador Web, PHP, MySQL, JQuery, Administrador Linux. LAMP, Lighttpd, Nginx.