-   Linux - General (
-   -   Automatic root login at start? (

Hogweed 01-31-2002 04:07 PM

Automatic root login at start?
How do I setup Linux to automatically login as root at startup?

trickykid 01-31-2002 04:35 PM

I would advise against this, due to security reasons.

Hogweed 01-31-2002 04:42 PM

I'm developing an embedded application that is running on PeeWee Linux. I need root privileges and eventually the system will have to boot without prompting for user/pass.

Species8472 01-31-2002 05:06 PM

Look out! Some seem to have an almost religious respect for “root”. To even speak of such things can get you kicked from IRC or possibly banned. It happened to me 5 mins after my first boot into Linux. It’s almost a flame troll. I know there is a way but damn if I know how. I have searched usenet and found some stuff but the threads usually turn to flames. Here is what I found

It starts here:

A couple of ideas

I have not had any success. If you figure it out. Please post how you did it.

acid_kewpie 01-31-2002 05:50 PM

why can you not just run your programs from a boot script like /etc/rc.local? it'll be executed with root perms but without logging in.

DavidPhillips 01-31-2002 06:02 PM

You should do as acid says.

Is the program running in X?

Hogweed 01-31-2002 06:25 PM

>>why can you not just run your programs from a boot script
>>like /etc/rc.local? it'll be executed with root perms but without
>>logging in.

I didn't know that I could do that. Thanks for the info.

Will that boot script execute the program without any login at all or does a user have to log in first?

>>Is the program running in X?


DavidPhillips 01-31-2002 06:31 PM

Since it does not use X that eliminates the need for bringing up X on boot, and you can run your program from rc.local without anyone logging in.

Malicious 01-31-2002 08:37 PM

This is not exactly the way you asked this question in the programming forum, but here is the answer that I posted there.

To enable an "ordinary" user to run a program as root, that program must be owned by root and have suid permission set. Login as root and use the "chown" command to change the ownership of the program to root and then use the "chmod" command to set suid permission (chmod +s program-name). Now any user can execute this program and it will run with root as the user id. Now figure out when you want to run the program. The simplest solution to running a program at login would be to add the execution of the program to your login script in /etc/profile or whatever shell profile file you use.

dj_relentless 01-31-2002 08:50 PM

Everytime I see it I always sit here wondering..but I still can't get acids signature..

acid_kewpie 02-01-2002 07:38 AM

what's there to get? it's ripped of of, some online computing sitcom type thingy. the sample avi's are quite funny, one where the office paperclip is standing next to this guy just goin "it's looks like you want to write a letter!" again and again until he mangles the clip to death... guess you had to be there...

All times are GMT -5. The time now is 07:22 AM.