You are not logged in.

#1 2011-10-21 11:44:48

soroush
Member
From: Urmia - IRAN
Registered: 2011-09-25
Posts: 33

Login with root user without password after boot

Hello

I need to do something in arch to login without enter root password, immediately after boot ?

Offline

#2 2011-10-21 11:51:32

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Login with root user without password after boot

Offline

#3 2011-10-21 11:57:51

soroush
Member
From: Urmia - IRAN
Registered: 2011-09-25
Posts: 33

Re: Login with root user without password after boot

Thank you. Googling around couldn't find it !

(I'll try and come back)

Offline

#4 2011-10-21 12:29:19

soroush
Member
From: Urmia - IRAN
Registered: 2011-09-25
Posts: 33

Re: Login with root user without password after boot

Tried the C program. It requires password. I need to login with no password...

Offline

#5 2011-10-21 12:32:38

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Login with root user without password after boot

soroush wrote:

Tried the C program. It requires password. I need to login with no password...

I never tried the C program, but both agetty and mingetty work for regular user - never tried root though.

Offline

#6 2011-10-21 12:41:05

soroush
Member
From: Urmia - IRAN
Registered: 2011-09-25
Posts: 33

Re: Login with root user without password after boot

The agetty way also doesn't worked for me. It says:

INIT: Id "c1" respawning too fast: disabled for five minutes
INIT: no more processes left on this runlevel

Offline

#7 2011-10-21 17:00:08

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 4,092

Re: Login with root user without password after boot

Why root?


Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

#8 2011-10-21 17:06:50

soroush
Member
From: Urmia - IRAN
Registered: 2011-09-25
Posts: 33

Re: Login with root user without password after boot

Mr.Elendig wrote:

Why root?

I have no other user! It's no matter even root or any other user to login. I just have a robot with archlinux installed and I want it start to work when power button is pressed. There is no keyboard to enter password of course :-/

Last edited by soroush (2011-10-21 17:07:58)

Offline

#9 2011-10-21 17:16:16

lilsirecho
Veteran
Registered: 2003-10-24
Posts: 5,000

Re: Login with root user without password after boot

Perhaps using xfce4 and starting it in /etc/rclocal will give you root without passwd.....It works here...


Prediction...This year will be a very odd year!
Hard work does not kill people but why risk it: Charlie Mccarthy
A man is not complete until he is married..then..he is finished.
When ALL is lost, what can be found? Even bytes get lonely for a little bit!     X-ray confirms Iam spineless!

Offline

#10 2011-10-21 17:21:29

soroush
Member
From: Urmia - IRAN
Registered: 2011-09-25
Posts: 33

Re: Login with root user without password after boot

lilsirecho wrote:

Perhaps using xfce4 and starting it in /etc/rclocal will give you root without passwd.....It works here...

AFAIK xfce is a DE !! I don't want to install any unnecessary program on my board . There is only a clear arch without any desktop or extra kernel modules ...

Offline

#11 2011-10-21 17:27:24

soroush
Member
From: Urmia - IRAN
Registered: 2011-09-25
Posts: 33

Re: Login with root user without password after boot

Ok, Finally I did it cool

Installed a new arch system with no root password set. and then, just compile this C program:

#include <unistd.h>
int main(void) 
{
   execlp("login", "login", "-f", "root", NULL);
} 

using gcc with optimization flags:

gcc -O3 -o /bin/auto-login ./auto-login.c

Then I edited the /etc/inittab :

c1:2345:respawn:/sbin/agetty -n -l /bin/auto-login -s 38400 tty1 linux
#c2:2345:respawn:/sbin/agetty -8 -s 38400 tty2 linux
#c3:2345:respawn:/sbin/agetty -8 -s 38400 tty3 linux
#c4:2345:respawn:/sbin/agetty -8 -s 38400 tty4 linux
#c5:2345:respawn:/sbin/agetty -8 -s 38400 tty5 linux
#c6:2345:respawn:/sbin/agetty -8 -s 38400 tty6 linux

now I'm going to remove boot loader and UDev roll

Last edited by soroush (2011-10-21 17:28:25)

Offline

Board footer

Powered by FluxBB