Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's 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 just installed Mandrake 9.1(yes I know it's old but I need something with kernel 2.4 for personal reasons) and I accidentally checked the auto-login box during the installation and not it always logs me into my default user account. I need to find out how to login as root instead?
I've tried booting up into linux-nonfb and then logging in as root and that works, but when I try to startx it gives me an error and bombs out back into the shell.
How to disable the auto-login, or have the auto-login log me in as root instead?
Thanks for the warning. This is a development PC where so I'll need to be logged in as root. I don't wish to su/sudo every time I run a new console. So, I need to be logged in as root. Can anyone please answer the question? Thank you.
in /etc/kde3/kdm/kdmrc, allow root login (set to TRUE). This is still a bad idea anyway. What is the point of having a root user if you are logged as root by default? Just chmod -R 777 /* then. I really don't get why you want to do that, but anyway it's your computer...
He just said it was a development computer. I do the same thing on my development target systems; it is just a lot easier to be root when you are doing development things (device level, kernel level, module level - not user level - development). You need the access anyway and typing sudo all the time is a royal PITA.
When you are doing this kind of work, the machine is not in production and ordinarily won't be surfing the web (though it might be going out on the internet). So telling him how he OUGHT to be doing it is counterproductive; he has good reasons for being root all the time just as I have good reasons for being root all the time on my target systems.
Generally, though, I run my target systems headless and ssh into them, then su to root once I am there. Then, as required, I forward X sessions to my workstation (where I am NOT root), or do whatever else is required.
Give it the same password that you use when you log in.
Once you have set a password for root, then go to the command line and type "su" it will ask you for the password and once done, the prompt will change from $ to # and you will be Root until you power down or type "exit" at the # prompt.
Good luck with it.
Many programs won't work just because they are launched as root, and they shouldn't. Only ubuntu doesn't have a root and you don't have to type sudo everytime when you are logged as root. You can have a konsole logged as root (I do that with a red background to remind me that I'm logged as root - even on my development machine). It's not just about security. Many programs just don't work when you are logged as root. KDM doesn't allow you to log as root by default, you have to edit a configuration file for that. And then, many things just won't work. This is for a reason. You are going to run into a lot of problems if you launch X from root.
Anyway, I still see no reason to do that. Just add the konsole to the sudoers file with no password and you don't have to type the root password everytime to launch it as root. This is way less troubles that setting every applications (starting from the X server itself) to run as root in my opinion.
Anyway, this is just my opinion and it is your computer. If you think it is better for you then o it.
Give it the same password that you use when you log in.
Once you have set a password for root, then go to the command line and type "su" it will ask you for the password and once done, the prompt will change from $ to # and you will be Root until you power down or type "exit" at the # prompt.
Good luck with it.
OK I modified kdmrc(which is actually in /usr/share/config/kdm) to allow root login as well as unhide the root user. However the automatic login is still there. I'm able to logout and then relogin back as root, but how do I get rid of the autologin?
Thanks for the warning. This is a development PC where so I'll need to be logged in as root. I don't wish to su/sudo every time I run a new console. So, I need to be logged in as root. Can anyone please answer the question? Thank you.
You are free to do whatever you want, of course.
But there's absolutely nothing in that post that is a true reason to run as root. Root has nothing to do with developing software, root is meant only for administrative stuff, like configuring your system, adding or deleting users, installing software, etc. You don't need to be root to develop.
PS: Indeed, that it's a machine meant for developing (a serious use, I assume) is yet another reason to take care and use it correctly, and that includes using root only when strictly needed. Every user should run always only with the minimal privileges that are enough to fulfill his work, and nothing else. To run with more privileges that those that you need is to run useless risks without any reason.
And definitely, running X apps as root is never a good idea, and a thing that I always advise against. A misclick can render your install useless forever.
PS(2): kernel development is not an excuse either. You only need the elevation of privileges to do make install modules_install, everything else is doable as a regular user. A couple of alias and sudo can sort that so you can install the kernel with typing a single character if that's the problem.
OK I modified kdmrc(which is actually in /usr/share/config/kdm) to allow root login as well as unhide the root user. However the automatic login is still there. I'm able to logout and then relogin back as root, but how do I get rid of the autologin?
Thanks.
In the same config file, there should be something like auto-login.
You can also disable it by holding the shift key just when X starts.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.