LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   auto login as root (https://www.linuxquestions.org/questions/linux-newbie-8/auto-login-as-root-242502/)

Whisky_Drinker 10-14-2004 06:53 AM

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.

RockmanExe 10-14-2004 10:16 AM

First, i must say that autologin as root is highly not recomended :tisk:
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

Tinkster 10-14-2004 03:49 PM

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

/bin/bash 12-02-2004 04:59 AM

http://www.linuxquestions.org/questi...615#post902615

ksun 01-19-2005 01:07 PM

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.

XavierP 01-19-2005 02:16 PM

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

Padma 01-19-2005 02:34 PM

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.

Tinkster 01-19-2005 03:11 PM

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

ksun 01-19-2005 04:22 PM

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.

trickykid 01-19-2005 04:39 PM

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. ;)

Tinkster 01-19-2005 04:40 PM

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

ksun 01-19-2005 04:53 PM

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.

ksun 01-19-2005 04:58 PM

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.

homey 01-19-2005 05:04 PM

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.

Tinkster 01-19-2005 05:08 PM

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


All times are GMT -5. The time now is 10:13 AM.