Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I am needing to log in as root to do some stuff, can anyone please assist me in how i would go about enabling root to log in via the graphical interface please
By default the root account has a password that is difficult to guess. Instead of using root, you can sudo your commands (it will prompt you for YOUR password).
To set the password for root, type the below in a terminal
By default the root account has a password that is difficult to guess
By default, Ubuntu has NO root password---ie the account is disabled.
Note: You may also want to enable the GUI root login. (Although most will tell you this is really bad idea). This is done in the config menus--I think it called login manager....
That is what I thought, but pixellany corrected me. The answer might be in the passwd man page.
Quote:
User accounts may be locked and unlocked with the -l and -u flags. The -l option disables an account by chang*ing the password to a value which matches no possible encrypted value. The -u option re-enables an account by changing the password back to its previous value.
Wonder how they achieve the latter unless a copy is stored somewhere.
Last edited by Wim Sturkenboom; 04-05-2007 at 12:35 AM.
Reason: fixed a closing tag
That is what I thought, but pixellany corrected me. The answer might be in the [i]passwd[i/] man page.
Wonder how they achieve the latter unless a copy is stored somewhere.
But pixellany might well be wrong....
After my other post, I realized that I did not have absolute detailed knowledge of what happens.
How DO you disable an account? Can you tell from /etc/passwd if it is disabled?
Originally posted by pixellany:
How DO you disable an account? Can you tell from /etc/passwd if it is disabled?
Yes, you can if the root line in /etc/passwd looks like this:
root:x:0:0:root:/root:/sbin/nologin
Then the account is disabled, but sudo and other apps that do not require access to the shell can still access the root account.
It is reenabled when you change /sbin/nologin to /bin/bash or another shell, but the great thing to me still is which is the password... ubuntu, may be? I've seen many Ubuntu's that doesn't ask you for root password, so, it is disabled AND passwordless, may be?
EDIT: An empty /etc/securetty file prevents root login from any device too.
Last edited by runnerfrog; 04-04-2007 at 04:00 AM.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.