On Mon, Jun 15, 2009 at 08:09:10AM -0700, Unga wrote:

> 
> --- On Mon, 6/15/09, Ruben de Groot <mai...@bzerk.org> wrote:
> 
> > From: Ruben de Groot <mai...@bzerk.org>
> > Subject: Re: Cannot login as root, exited on signal 11
> > To: "Glen Barber" <glen.j.bar...@gmail.com>
> > Cc: "Unga" <unga...@yahoo.com>, freebsd-questions@freebsd.org
> > Date: Monday, June 15, 2009, 9:27 PM
> > On Sun, Jun 14, 2009 at 04:11:12PM
> > -0400, Glen Barber typed:
> > > On Sun, Jun 14, 2009 at 9:06 AM, Unga<unga...@yahoo.com>
> > wrote:
> > > >
> > > > Hi all
> > > >
> > > > This is FreeBSD 7.2 on i386.
> > > >
> > > > After a custom compiled from sources
> > installation, root cannot log in but normal users can log
> > in.
> > > >
> > > > Here are the messages in /var/log/messages:
> > > > Jun 14 00:44:58 xxx login: ROOT LOGIN (root) ON
> > ttyv0
> > > > Jun 14 00:44:58 xxx kernel: pid 757 (login), uid
> > 0: exited on signal 11
> > > > Jun 14 00:45:00 xxx kernel: pid 760 (cron), uid
> > 0: exited on signal 11 (core dumped)
> > > >
> > > > Note, cron also fails.
> > > >
> > > > When try to log in, it checks the password
> > correctly, ie. if I type a wrong password for root, it says
> > "Incorrect ...", but when type the correct password, it
> > simply come out and prompts the login prompt.
> > > >
> > > > It looks like something is missing required for
> > the root to log in. I'm using bash shell. Any ideas?
> > > 
> > > I'll make the (probably correct) assumption that
> > you've changed root's
> > > default shell to bash.
> > > 
> > > If so, reboot into single-user mode, and change it
> > back.
> > 
> > Why reboot? You can "su -s /bin/tcsh"
> > 
> > > This is one of the best reasons not to screw around
> > with the root account.
> > 
> > Agree. I should bookmark this thread for when (not if) this
> > discussion comes up
> > again.
> >
>  
> Thank you guys for replies.
> 
> Now I have more info. I have put some print messages to login.c and 
> libutil/login_class.c source files. Here what it shows:
> login: pam_session_established, going to fork.
> login: Master process ID: 763
> login: We are now in the child process!
> kernel: pid 868 (login), uid 0: exited on signal 11
> login: Child process ID: 868
> login: export_pam_environment() done.
> login: We're done with PAM now
> login: username: root
> login: setlogin() done
> login: lc: root
> login: pw_uid: 0
> login: We are now inside setusercontext()
> 
> What happens is, after the child process is forked in login, it die due to 
> some reason. But the child process continue up to setusercontext().
> 
> That "We are now inside setusercontext()" is the first statement in the 
> setusercontext(). It doesn't execute up to LOGIN_SETGROUP after that.
> 
> But the strange thing is whole thing get executed well for normal users.
> 
> The cron also fail due to same reason.
> 
> Btw, regarding bash for root, I'm using that on other FreeBSD machines 
> for long time.

You can if you want, but you may have to make sure it is in root's
path.   That becomes an issue if you are booted to single user for
any reason.  Some of those reasons may also make /usr unavailable 
at that time.

Also, although most system scripts should explicitly name their shell
interpreter at the beginning, it is possible some scripts somewhere
do not and make an assumption that is it sh or csh.  That is more 
likely if you have something non-base installed.

I haven't followed the thread, but is it possible that you are
coming up against root not being allowed to log in from a remote
location that is the default in FreeBSD?   You normally have to 
log in on a non-root account and then su(1) to be root.  Or you
have to change some configuration to allow root to remote log in
(not advised!).

////jerry

> 
> Any ideas for whats going on?
> 
> Regards
> Unga
> 
> 
> 
> 
> 
> 
>       
> _______________________________________________
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
_______________________________________________
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"

Reply via email to