LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This 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


Reply
  Search this Thread
Old 06-30-2005, 12:26 AM   #1
m.harshavardhan
Member
 
Registered: May 2005
Location: Bangalore(india)
Posts: 44

Rep: Reputation: 15
How to Autologin as a root(Superuser)


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.

thanks in advance
harsha
 
Old 06-30-2005, 12:53 AM   #2
kencaz
Senior Member
 
Registered: Mar 2005
Location: Las Vegas, NV
Distribution: Mandriva Slackware FreeBSD
Posts: 1,468

Rep: Reputation: 48
I don't believe there is and hope there will not be a way in the future...

KC
 
Old 06-30-2005, 06:58 AM   #3
mikedeatworld
Member
 
Registered: Nov 2003
Location: Farmington Michigan
Distribution: UBUNTU - Slackware - SuSE 9.1 - Knoppix - Fedora
Posts: 828

Rep: Reputation: 30
Think about what you are asking, why you are asking this, which operating system does this, why those distros that login as root -- are unsecure...


How hard is it to login as root?
 
Old 06-30-2005, 07:09 AM   #4
cs-cam
Senior Member
 
Registered: May 2004
Location: Australia
Distribution: Gentoo
Posts: 3,545

Rep: Reputation: 57
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.

* - excuse the language, but it's true

Last edited by jtshaw; 09-07-2005 at 08:34 AM.
 
Old 06-30-2005, 11:29 AM   #5
mikedeatworld
Member
 
Registered: Nov 2003
Location: Farmington Michigan
Distribution: UBUNTU - Slackware - SuSE 9.1 - Knoppix - Fedora
Posts: 828

Rep: Reputation: 30
Man, I feel bad for this guy, but really, how else can you respond to the question.

Please read this...

http://howtos.linux.com/guides/solrh...ap5sec32.shtml
 
Old 06-30-2005, 11:46 AM   #6
doctorflange
LQ Newbie
 
Registered: Jun 2005
Distribution: MDK 10.2 (LE2005)
Posts: 3

Rep: Reputation: 0
Hehe, you know what's funny?

Windows will not only let an Administrator account not have a password, but also auto-log you in without a password if you're an Admin user.
 
Old 06-30-2005, 11:46 AM   #7
Kdr Kane
Member
 
Registered: Jan 2005
Distribution: SUSE, LFS
Posts: 357

Rep: Reputation: 30
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.
 
Old 06-30-2005, 03:05 PM   #8
DaWallace
Member
 
Registered: Feb 2004
Location: Southern Maine, United States
Distribution: Slackware Ubuntu Debian FreeBSD
Posts: 418

Rep: Reputation: 31
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.
 
Old 06-30-2005, 04:00 PM   #9
zackarya
Member
 
Registered: Jul 2003
Distribution: OpenSuse 10, Debian
Posts: 152

Rep: Reputation: 30
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.

Hope that helps.

Zack
 
Old 07-21-2005, 10:14 PM   #10
jkirsher
LQ Newbie
 
Registered: Jul 2005
Distribution: SuSE
Posts: 2

Rep: Reputation: 0
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?
 
Old 07-22-2005, 12:44 AM   #11
jtmillard
LQ Newbie
 
Registered: Sep 2004
Location: Middleton ID (Boise)
Distribution: FC5
Posts: 27

Rep: Reputation: 15
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.
 
Old 07-22-2005, 06:23 PM   #12
jkirsher
LQ Newbie
 
Registered: Jul 2005
Distribution: SuSE
Posts: 2

Rep: Reputation: 0
or better yet...

login in as root and execute the following:
passed -d
// deletes the need for a password for the root account

then edit /etc/inittab and add --autologin root to all the mingetty lines of the inittab, so your inittab would look something like this:

1:2345:respawn:/sbin/mingetty --autologin root tty1
2:2345:respawn:/sbin/mingetty --autologin root tty2
3:2345:respawn:/sbin/mingetty --autologin root tty3
4:2345:respawn:/sbin/mingetty --autologin root tty4
5:2345:respawn:/sbin/mingetty --autologin root tty5
6:2345:respawn:/sbin/mingetty --autologin root tty6

Reboot the system and your done. The system autologins into the root account.
 
Old 08-17-2005, 04:10 AM   #13
RohanShrivastav
Member
 
Registered: Sep 2004
Distribution: SuSE 9.0, Red Hat 9.0, Fedora core 1
Posts: 70

Rep: Reputation: 15
But before that you make sure that mingetty supports --autologin option. If not then apply patch.
 
Old 09-06-2005, 01:42 PM   #14
chris.holman
LQ Newbie
 
Registered: Sep 2005
Posts: 2

Rep: Reputation: 1
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.

Regards,
Chris Holman
Awltux.com
 
1 members found this post helpful.
Old 09-06-2005, 02:38 PM   #15
mikedeatworld
Member
 
Registered: Nov 2003
Location: Farmington Michigan
Distribution: UBUNTU - Slackware - SuSE 9.1 - Knoppix - Fedora
Posts: 828

Rep: Reputation: 30
Now, if you would have explained the reason for this, I bet the solution would have came much easier. Hope its going well....
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to create a superuser other than root WindowsBurner Linux - General 21 01-02-2006 07:34 PM
Autologin as root - how? tomcat22 Debian 9 10-15-2004 06:27 PM
how do i autologin as root on RH9? taoweijia Linux - General 5 03-08-2004 09:20 PM
Autologin under Lindows, not root lectraplayer Linux - Newbie 2 03-06-2004 08:47 PM
Auto Root Login or add superuser jasonpojo Linux - General 12 03-05-2004 05:06 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:05 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration