Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
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.
hi
i am using linux Fedora core 3.
is it possible to autologin as a root(super user)?
i am able to autologin as a non-root user .
now i want to autologin as a root.i know that some security problems will arise if we autologin as a root,but i will takecare.
when i start my PC it should not ask for me any user name and password ,it should automatically enter into system as a root ,it is called autologin for root.
i am able to autologin as a non-root(guest)user.but now i want root to be autologin.
I'm pretty sure GDM will do this, it has auto-login for standard users I can't see why you couldn't log in as root the same way. Doing so would be ******* stupid but that's your call.
You know what? This is a valid technical question. And I would also like to know the answer. I can't possibly fathom that it's impossible with all the awesome flexibility of Linux.
He said he understood the security implications. There wasn't any need to denegrate him or the question.
It is valid to make sure he is aware of the security concerns, but none of you really know what his requirements are.
it may not be impossible, but it is stupid and because of that, it has been made very difficult by those who make login managers. I know no way to make GDM do it without altering the source code, and recompiling, this is so idiots who don't fully understand what they're doing can't pull it off, there might be some hidden argument you could put in the configuration to get it to work this way but I doubt it.
whatever his requirements.. he should find another way.
Well I have to say that I concur with the sentiment that this would be a
VERY BAD IDEA(and it might not be possible).
Having said that:
I would'nt think that you need to log in as root specifically, just someone with
higher privileges. Create a user who has the privileges that you need and use
that user.
Since you never said WHY you need to do this I don't know what your
trying to accomplish so that might not work for you.
I agree that it is a very bad idea to have the root autologin for any "production" system.
But there is a valid case for having a "test" system to have the ability to autologin with the root account.
Case in point, we have a test system which I do driver development. The system is not connected to any network and security is not an issue at all. If the system gets "comprimised" in any manner, we simply rebuild the system. It is much easier to do development under the root account since we have no need to security and the system is used only for development and testing. There are several test scripts which we have created to test out drivers and it would be of great use if we could modify the script to reboot the system into various kernels and run a validation script without having the user stand around waiting for the login prompt.
So back to the original question, even though we have clearly stated and discussed why this is a very bad idea, does anyone have a way for the root account to autologin?
How about this?
Instead of logging in as root, put yourself in the wheel group and set up
/etc/sudoers so you do not need a password.
Then write your test scripts to sudo the functions that require root access.
You get the password free access without munging the kernel or any other
standard software.
Doing this is still very dangerous but could make life easier on a driver developer.
I would never recommend this for a production system, but a driver development
system that can easily be recovered, heck why not, drivers will probably destroy
your system from time to time by themselves.
Here another solution if you want to automatically log into KDE (or anything that uses a Display Manager to control logins) as root. Took me a while find it so I thought I'd write it up here. The solutions so obvious when you think about it.
I'm writing an automated test environment that simultaneously tests many networked devices. Each device does a network boot into a NFS mounted Linux OS . Many of the low level tests require root access and some require access to an X Windows display. There may be a more elegant solution, but this works for me.
I'm using RHEL AS3, but I'm sure this would work for other Linux distro's
As mentioned above, delete the root password. Login in as root and execute the following:
passed -d
You cannot use the GDM as it doesn't allow automatic root logins. Use KDM instead by editing /etc/X11/prefdm( or whatever is invoked at the end of your inittab) and set:
preferred = kdm # This makes kdm the default display manager
Now configure KDM by editing /etc/kde/kdm/kdmrc and set the following values:
[X-:0-Core]
# Enable automatic login on this display. USE WITH EXTREME CARE! <== Very true, and I wouldn't do this on any normal system.
# Default is false
AutoLoginEnable=true
# The user to log in automatically. NEVER specify root! <== Hmmm ,I'll just have to ignore this
AutoLoginUser=root
Reboot the system and your done. The system does an automatic login to KDE as the root user.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.