Skip to main content
  1. Archives/

Enabling And Disabling Root Account in Debian/Ubuntu

··248 words·2 mins·
Tips & How-To's Debian Linux Tutorials

Debian and other debian-based distros like Ubuntu have, by default, has the root account disabled as a security measure.(thanks to Subbu and PICCORO for the clarification)

To re-enable the root account, just open the command prompt, and type

sudo passwd root

You’ll get the following set of messages:

sathya@sathya-laptop:~$ sudo passwd root<br /> Enter new UNIX password:<br /> Retype new UNIX password:<br /> passwd: password updated successfully<br /> sathya@sathya-laptop:~$

To disable root access, just type

sudo passwd -l root

If you’re weary of using the command line(you shoudn’t ;) ) then there’s another way:

Just head over to System > Administration > Login Window > Security > and check mark the box beside Allow local system administrator login.

DISCLAIMER: Christof Baumann mentions in this post as to why you shouldn’t fiddle with the root account:

Be aware of locking the root account if you once activated it. I activated the root account and skipped the %admin ALL=(ALL) ALL line int /etc/sudoers file because i thought i wouldn’t need it anymore. Then i disabled the root account without thinking and now had no chance to start programs with root rights. Luckily i could restore it using a knoppix live cd. Be aware of changing settings concerning the root account.

Also, read this article in Ubuntu Wiki as to why sudo is preferred over standard root account.

PS: Just incase you guys are wondering why I’ve posted this basic info so late, well I’m just getting the hang of Ubuntu.

Sathyajith Bhat
Author
Sathyajith Bhat
Author, AWS Container Hero and DevOps Specialist.

Related

Formatting USB pen drive in Linux using Terminal
··251 words·2 mins
Tips & How-To's Commands Filesystem Linux
Insert your USB pen drive. Let it get detected and mounted. Open Terminal. Type The Following commands dmesg |tail -> here the ‘|’ key is the pipe, ie, the key before the backspace key(the upper one, so press shift) You’ll get something like sathya@shaman:~$ dmesg |tail [ 9921.681164] sda: Write Protect is off [ 9921.681174] sda: Mode Sense: 23 00 00 00 [ 9921.681178] sda: assuming drive cache: write through
5 Commands Every Linux Newbie Must Know
··476 words·3 mins
Tips & How-To's Commands Tips Tutorials
Although Linux had progressed far from being a command-line only OS to a full fledged totally GUI based one, sometimes, the command line is the best way to get something done. Here are 5 of the must-know commands. These commands can b quite useful and handy. 1: mount: Used for mounting Windows/Other partitions, just in case it isn’t automatically mounted. Usage: mount here refers to the special device where your partitions are.
A Look At Ubuntu Gutsy Gibbon
··613 words·3 mins
Reviews Linux Ubuntu
Ubuntu Gutsy has been receiving a huge amount of hype and fan fare recently, and I’ve been following Gutsy closely, from Ubuntu Fridge’s 10 Rocking Features in 10 Days to fellow bloggers and Linux users posts on Gutsy. Naturally after their Feisty launch, expectations were high(from my side). Now I’m not Ubuntu’s biggest fan(I’m a SuSE fellow, Novell haters, meh!), but I appreciate what Ubuntu has been doing for newbie Linux users in general.