[prev in list] [next in list] [prev in thread] [next in thread]
List: busybox
Subject: Re: Howto use cttyhack with login - job control turned off
From: Tito <farmatito () tiscali ! it>
Date: 2009-06-29 12:13:37
Message-ID: 200906291413.37679.farmatito () tiscali ! it
[Download RAW message or body]
On Monday 29 June 2009 08:50:40 Manuel Sahm wrote:
> Hello,
>
> I tried your suggestion but it seems to be a problem in login :
>
> I add the lin ::respawn:/bin/cttyhack /bin/login in the inittab file.
> I insert the line root:x:0:0:Super-User:/:/bin/date in the /etc/passwd
> file.
>
>
> After restart I type the correct login data an the this appears:
>
> 192.168.3.141 login: root
> Password:
> Login incorrect
>
> 192.168.3.141 login:
>
>
> Any ideas ?
>
> Thanks
> Manuel
>
> >>> Denys Vlasenko <vda.linux@googlemail.com> 27.06.2009 16:45 >>>
> On Sat, Jun 27, 2009 at 4:15 PM, Manuel Sahm<ManuelSahm@freenet.de>
> wrote:
> > If I enter ">::respawn:/bin/cttyhack /bin/login" in my inittab
> file, the
> > login process doesńt work ?!
> >
> > The problem is, that when I enter the right login data, the login
> freezes
> > for 1-3 seconds and is restarted.
>
> If you see "Login: " prompt, it means that /bin/login
> is already successfully started. When you enter the username/password,
> login will try to exec user's shell as it is specified in user's passwd
> entry
> (/etc/passwd file or whatever). If you don't see the shell prompt,
> it means either login failed to exec and decided to die,
> or the shell was started but decided to die for some reason.
>
> Try replacing user's shell in /etc/passwd with, say, /bin/date.
> Then try to login. If you see date printed after login,
> then login is execing the "shell" successfully -> problem is in shell.
> If not, the problem is in login.
>
> > (Maybe cttyhack is "killed" after successful login and that́s why
> all is
> > restarted ?)
>
> No. cttyhack is exec'ing /bin/login. In Unix, "exec'ing" means using
> execve syscall, which _replaces_ the process with another one,
> it does not start a new process.
>
> So, when you see "Login: " prompt, cttyhack is already done its job,
> exec'ed /bin/login and therefore cttyhack program does not run
> anymore. The problem is not here.
>
> --
> vda
Hi,
do you have the needed libnss*.so files in /lib and /etc/nsswitch.conf ?
Ciao,
Tito
_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic