LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 10-14-2004, 06:53 AM   #1
Whisky_Drinker
LQ Newbie
 
Registered: Oct 2004
Location: UK
Posts: 1

Rep: Reputation: 0
Question auto login as root


All,

I have a question regarding auto login as root in Linux.
I am WELL aware of the security risks involved in this but I'm keen to figure this out as it has been puzzling me for some time.

I know it can be done as I have installed Fedora Core 1 numerous times and during the install it always gives you the option of logging on a user on first boot. You tell the installer you want to auto login as root, it warns you of the risks but accepts it.

I have trawled many forums looking for the answer on this but with no luck.
There are many posts asking the same question as me but all the replies seem to ask why the user wants to do this or point out all the security issues involved
without an actual answer.

Please note that I have already tried the 'Automatic Login' and 'Timed Login' but as you will all be aware they do not work for root.
 
Old 10-14-2004, 10:16 AM   #2
RockmanExe
Member
 
Registered: Aug 2003
Distribution: Mandriva, Slackware
Posts: 265

Rep: Reputation: 30
First, i must say that autologin as root is highly not recomended
heheh

i don't know about fedora, but in mdk there's a file called autologin, located in
/etc/sysconfig/autologin, i haven't tried editing it for root account but it's worth a try

hope this helps
 
Old 10-14-2004, 03:49 PM   #3
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Re: auto login as root

Quote:
Originally posted by Whisky_Drinker
Please note that I have already tried the 'Automatic Login' and 'Timed Login' but as you will all be aware they do not work for root.
How rude. That's like stoping people from suicide
rather than helping them. Wicked distro.



Cheers,
Tink
 
Old 12-02-2004, 04:59 AM   #4
/bin/bash
Senior Member
 
Registered: Jul 2003
Location: Indiana
Distribution: Mandrake Slackware-current QNX4.25
Posts: 1,802

Rep: Reputation: 47
http://www.linuxquestions.org/questi...615#post902615
 
Old 01-19-2005, 01:07 PM   #5
ksun
Member
 
Registered: Sep 2003
Posts: 52

Rep: Reputation: 15
I just love it when after you state "I know the risks" that people, including moderators, still find more usefulness in lecturing than helping out.

I bet half the people that lecture about security, login as root for normal tasks themselves.

Anyway, this guy had a legitimate question, and I could use the info too. Distro's like fedora have an auto login function, is there any workaround to get that to accept root? Or some other simple way?

I can't really afford to change the way the system works by replacing the *getty stuff the way some other threads suggest because I need to test these systems as close to normal as possible. But, I have a LOT of systems in a test environment and when I walk up to any of them I need to use root righ n-o-w since I change machines constantly and a few seconds to type a login name gets multiplied a thousand times.

I have a private network setup where security and viruses aren't an issue. Really, trust me, I really know what I am doing. Help me and this other guy out, please.
 
Old 01-19-2005, 02:16 PM   #6
XavierP
Moderator
 
Registered: Nov 2002
Location: Kent, England
Distribution: Debian Testing
Posts: 19,192
Blog Entries: 4

Rep: Reputation: 475Reputation: 475Reputation: 475Reputation: 475Reputation: 475
Quote:
Originally posted by ksun
I just love it when after you state "I know the risks" that people, including moderators, still find more usefulness in lecturing than helping out.

There really are very good reasons not to do this - we don't just get a thrill from posting that it shouldn't be done.

I bet half the people that lecture about security, login as root for normal tasks themselves.

I bet they don't
 
Old 01-19-2005, 02:34 PM   #7
Padma
Member
 
Registered: Aug 2003
Location: Omaha, NE, USA
Distribution: PCLinuxOS 2007
Posts: 808

Rep: Reputation: 30
I *have* read one or two instances here where it is much more convenient to log on as root to get some specialized functionality done, and I have been happy to help people in those situations directly log on as such. However, logging on as root is never something that should be done lightly. There is actually a *reason* that "Automatic Login" and "Timed Login" don't work for root. You should *always* make a conscious decision to be root, never let it "just happen".

I daresay that the majority of us simply use the "su" command to get needed system work done, and exit when we are finished.
 
Old 01-19-2005, 03:11 PM   #8
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Quote:
Originally posted by ksun
I just love it when after you state "I know the risks" that people, including moderators, still find more usefulness in lecturing than helping out.
If you had a decent back-ground in system administration
you'd know that what a user thinks he needs is not necessarily
what's actually required but just the first best thing that came
to his mind to "solve" a problem.

Quote:
I bet half the people that lecture about security, login as root for normal tasks themselves.
I, for one, don't.

Quote:
Anyway, this guy had a legitimate question,
And he got a legitimate answer. If he doesn't tell me WHY
he thinks he needs to get an automatic login as root I won't
even bother trying to talk to him about it.

Quote:
and I could use the info too.
Same question: what for? It's "udder stupidity", the linux
version f mad cow desease.


Cheers,
Tink
 
Old 01-19-2005, 04:22 PM   #9
ksun
Member
 
Registered: Sep 2003
Posts: 52

Rep: Reputation: 15
Glad we all have to justify ourselves to you. Simply stating "I know the risks and understand what I'm doing, so can you help me" isn't good enough.

Get Bill Gates down here to stamp his disclaimer all over the place:

"By following the instructions printed below, I understand that editing the Windows registry can cause system errors and intstibility."

It's called "Linux Questions" not "Linux Gatekeepers"

And for your info: I have been a Novell/WinNT administrator over 3000 users going on 5 years now. I think I have the slightest idea what security is, don't condescend to me.

Last edited by ksun; 01-19-2005 at 04:25 PM.
 
Old 01-19-2005, 04:39 PM   #10
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 270Reputation: 270Reputation: 270
Quote:
Originally posted by ksun
I just love it when after you state "I know the risks" that people, including moderators, still find more usefulness in lecturing than helping out.

I bet half the people that lecture about security, login as root for normal tasks themselves.
Its our nature to lecture. Clearly to me those who say they know the security risks but still want to do such things clearly don't know all the risks. If its going to be a standalone machine not on a network, maybe then, no worries.

But I'm the half that never will never login as root or even use su - to root. I don't think I've logged in as root on any of my machines for many many months, probably longer. Its called sudo, learn it, use it.. live by it.
 
Old 01-19-2005, 04:40 PM   #11
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Quote:
Originally posted by ksun
Glad we all have to justify ourselves to you. Simply stating "I know the risks and understand what I'm doing, so can you help me" isn't good enough.

It's called "Linux Questions" not "Linux Gatekeepers"
Glad that you believe that your will should be
done here ... it's still LinuxQuestions, and not
KsunRules... and don't you be condescending
to mods around the place.


Quote:
And for your info: I have been a Novell/WinNT administrator over 3000 users going on 5 years now. I think I have the slightest idea what security is, don't condescend to me.
So what ... 5 years ago I was responsible for 6000 servers
and 30000 clients. Your point is? My position didn't
make me infallible, just highly responsible. And since
you're a NT/Novell admin I care even less about what
you think you know about the risks of using Linux
inappropriately.

If you said "give me the code for those nukes, I know
the risk" I'd still feel no better about it. And since you
don't give any indication about the environment, whether
the box is Internet facing or not I'll always assume the
worst case scenario. And guess what: I don't need your
permission to do so. And I don't need to fulfill your expectations
either since you're not paying for my services.


Cheers,
Tink
 
Old 01-19-2005, 04:53 PM   #12
ksun
Member
 
Registered: Sep 2003
Posts: 52

Rep: Reputation: 15
trickykid,

I see what you are saying. But if someone says "I know I am not supposed to normally do this, but ...", it isn't very helpful to provide a response that only says "You're not supposed to do that."

I can understand if you are actually providing helpful information, and then you say "... but please use this information responsibly, and in the case of logging in as root that means x,y, and z."

I don't know what Tinkster thought he was contributing to the discussion.

I love sudo, it's great, but it doesn't solve every problem. I really do need root access already logged in on a lot of machines. Yeah, it IS on a private testing network, but even if it wasn't I don't understand the mindset that some people have that they should approve of the use of any information they give out, which means a 3 page report on why someone might need to do it.

Anyone that has real help, please feel free to comment.
 
Old 01-19-2005, 04:58 PM   #13
ksun
Member
 
Registered: Sep 2003
Posts: 52

Rep: Reputation: 15
Quote:
Originally posted by Tinkster
Glad that you believe that your will should be
done here ... it's still LinuxQuestions, and not
KsunRules... and don't you be condescending
to mods around the place.



So what ... 5 years ago I was responsible for 6000 servers
and 30000 clients. Your point is? My position didn't
make me infallible, just highly responsible. And since
you're a NT/Novell admin I care even less about what
you think you know about the risks of using Linux
inappropriately.

If you said "give me the code for those nukes, I know
the risk" I'd still feel no better about it. And since you
don't give any indication about the environment, whether
the box is Internet facing or not I'll always assume the
worst case scenario. And guess what: I don't need your
permission to do so. And I don't need to fulfill your expectations
either since you're not paying for my services.


Cheers,
Tink
Thanks for the help. And way to keep the discussion on track there, mod.

Last edited by ksun; 01-19-2005 at 04:59 PM.
 
Old 01-19-2005, 05:04 PM   #14
homey
Senior Member
 
Registered: Oct 2003
Posts: 3,057

Rep: Reputation: 61
Anyway, Getting back to the answer!

The first problem you need to tackle is a password - less root login
Next, if you look in Control Center / System Administration / Login Manager / Convenience...
It shows users who are able to use
[ ] Enable password-less login
[ ] Enble auto-login

You may notice that root is not one of them.... soooo
Figure out how to give root password-less login then...
Edit the file /etc/X11/xdm/kdmrc
Look for lines with goodies like
AutoLogin Enable=true
AutoLoginUser=fred
AutologinPass=secret
etc etc

If you get it right, root will show up in Control Center / System Administration / Login Manager / Convenience...

That might work for you, try it if you want.
 
Old 01-19-2005, 05:08 PM   #15
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Quote:
Originally posted by ksun
Thanks for the help. And way to keep the discussion on track there, mod.
Look kiddo ... you re-animate (hi-jack) a zombie of
a thread that already holds the information you're
after with a complaint about me (off topic) and
expect me to help you? Get a life.

Now you actually get the warning you deserved
in the first place.


Cheers,
Tink
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Auto-login (root account) sammykrupa Linux - Newbie 3 07-31-2005 12:27 AM
Auto login as root lmanwarren Fedora 2 04-10-2005 07:05 PM
Auto login once as root... dano1970 Linux - General 2 10-28-2004 06:19 AM
Auto Login Root In Level 3 dezeque Linux - General 1 04-27-2004 09:25 PM
SUSE 9.0 auto root login Denich Linux - Distributions 3 12-13-2003 11:01 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:43 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