Mailing List Archive

su problems
I'm trying to install bugzilla and need to su to apache, but I'm having some
weird problems with su. I can su root fine, but once there I can't su to
anyone but root. Here's some output:

# su apache
apache: /usr/sbin/apache: cannot execute binary file
# su someuser
someuser: someuser: No such file or directory

The same thing happens no matter what switches I pass. I checked /etc/passwd
and made sure the shell is set correctly, but other than that I don't know what
to do. Thanks in advance for your help!

-Dan




--
gentoo-user@gentoo.org mailing list
Re: su problems [ In reply to ]
Format of /etc/passwd is:
login:password:UID:GID:RealName:HomeDir:HomeShell

So, sounds like your HomeSHell for user apache is: /usr/sbin/apache
and it does not want you to execute that, if it exists?


And for the other users, I would make sure they have a valid home directory, and that /bin/bash is their path.

-Brad
----- Original Message -----
From: Dan Falcone <dan@falconeweb.net>
Date: Thursday, October 14, 2004 3:41 pm
Subject: [gentoo-user] su problems

> I'm trying to install bugzilla and need to su to apache, but I'm
> having some
> weird problems with su. I can su root fine, but once there I
> can't su to
> anyone but root. Here's some output:
>
> # su apache
> apache: /usr/sbin/apache: cannot execute binary file
> # su someuser
> someuser: someuser: No such file or directory
>
> The same thing happens no matter what switches I pass. I checked
> /etc/passwdand made sure the shell is set correctly, but other
> than that I don't know what
> to do. Thanks in advance for your help!
>
> -Dan
>
>
>
>
> --
> gentoo-user@gentoo.org mailing list
>
>


--
gentoo-user@gentoo.org mailing list
Re: su problems [ In reply to ]
Brad,

Thanks for your tips. I checked /etc/passwd and made sure the login shell for
apache was set to /bin/bash. I also created the home folder for the user, in
this case /home/httpd, and chowned it to apache:apache. I'm still getting the
same error.

Thanks,
Dan



Quoting bbonkosk@tampabay.rr.com:

> Format of /etc/passwd is:
> login:password:UID:GID:RealName:HomeDir:HomeShell
>
> So, sounds like your HomeSHell for user apache is: /usr/sbin/apache
> and it does not want you to execute that, if it exists?
>
>
> And for the other users, I would make sure they have a valid home directory,
> and that /bin/bash is their path.
>
> -Brad
> ----- Original Message -----
> From: Dan Falcone <dan@falconeweb.net>
> Date: Thursday, October 14, 2004 3:41 pm
> Subject: [gentoo-user] su problems
>
> > I'm trying to install bugzilla and need to su to apache, but I'm
> > having some
> > weird problems with su. I can su root fine, but once there I
> > can't su to
> > anyone but root. Here's some output:
> >
> > # su apache
> > apache: /usr/sbin/apache: cannot execute binary file
> > # su someuser
> > someuser: someuser: No such file or directory
> >
> > The same thing happens no matter what switches I pass. I checked
> > /etc/passwdand made sure the shell is set correctly, but other
> > than that I don't know what
> > to do. Thanks in advance for your help!
> >
> > -Dan
> >
> >
> >
> >
> > --
> > gentoo-user@gentoo.org mailing list
> >
> >
>
>
> --
> gentoo-user@gentoo.org mailing list
>
>




--
gentoo-user@gentoo.org mailing list
Re: su problems [ In reply to ]
perhaps you could send us the output of:
# grep -r apache: /etc/*

id shadow shows up in there you may want to black that out. This may also give you some more ideas...
(You also may want to have the system create a new entry, to make it clean)
so
#userdel apache
#adduser -d /home/httpd -s /bin/bash apache

-Brad

----- Original Message -----
From: Dan Falcone <dan@falconeweb.net>
Date: Thursday, October 14, 2004 4:06 pm
Subject: Re: [gentoo-user] su problems

> Brad,
>
> Thanks for your tips. I checked /etc/passwd and made sure the
> login shell for
> apache was set to /bin/bash. I also created the home folder for
> the user, in
> this case /home/httpd, and chowned it to apache:apache. I'm still
> getting the
> same error.
>
> Thanks,
> Dan
>
>
>
> Quoting bbonkosk@tampabay.rr.com:
>
> > Format of /etc/passwd is:
> > login:password:UID:GID:RealName:HomeDir:HomeShell
> >
> > So, sounds like your HomeSHell for user apache is: /usr/sbin/apache
> > and it does not want you to execute that, if it exists?
> >
> >
> > And for the other users, I would make sure they have a valid
> home directory,
> > and that /bin/bash is their path.
> >
> > -Brad
> > ----- Original Message -----
> > From: Dan Falcone <dan@falconeweb.net>
> > Date: Thursday, October 14, 2004 3:41 pm
> > Subject: [gentoo-user] su problems
> >
> > > I'm trying to install bugzilla and need to su to apache, but I'm
> > > having some
> > > weird problems with su. I can su root fine, but once there I
> > > can't su to
> > > anyone but root. Here's some output:
> > >
> > > # su apache
> > > apache: /usr/sbin/apache: cannot execute binary file
> > > # su someuser
> > > someuser: someuser: No such file or directory
> > >
> > > The same thing happens no matter what switches I pass. I checked
> > > /etc/passwdand made sure the shell is set correctly, but other
> > > than that I don't know what
> > > to do. Thanks in advance for your help!
> > >
> > > -Dan
> > >
> > >
> > >
> > >
> > > --
> > > gentoo-user@gentoo.org mailing list
> > >
> > >
> >
> >
> > --
> > gentoo-user@gentoo.org mailing list
> >
> >
>
>
>
>
> --
> gentoo-user@gentoo.org mailing list
>
>


--
gentoo-user@gentoo.org mailing list
Re: su problems [ In reply to ]
# grep -r apache: /etc/*
/etc/group:apache::81:
/etc/passwd:apache:x:1001:81::/home/httpd:/bin/bash
/etc/shadow:apache:!:12705:0:99999:7:::

I tried commenting out the entry in /etc/shadow per your suggestion, but that
had no effect. I also deleted and recreated the user - nothing.

I tried the same thing on my other gentoo boxes and came up with some
interesting results. I have 4 machines running gentoo, 3 of which were built
in the last 2 - 3 months. The three new installs are all exhibiting this
behavior in some form or another (the usual message is No such file or
directory) when trying to su from root to that user. It works fine on the
fourth machine, which has been around for about a year. I guess a brute force
method that might produce the answer would be to diff /etc from the old machine
against one of the newer ones.


Quoting bbonkosk@tampabay.rr.com:

> perhaps you could send us the output of:
> # grep -r apache: /etc/*
>
> id shadow shows up in there you may want to black that out. This may also
> give you some more ideas...
> (You also may want to have the system create a new entry, to make it clean)
> so
> #userdel apache
> #adduser -d /home/httpd -s /bin/bash apache
>
> -Brad
>
> ----- Original Message -----
> From: Dan Falcone <dan@falconeweb.net>
> Date: Thursday, October 14, 2004 4:06 pm
> Subject: Re: [gentoo-user] su problems
>
> > Brad,
> >
> > Thanks for your tips. I checked /etc/passwd and made sure the
> > login shell for
> > apache was set to /bin/bash. I also created the home folder for
> > the user, in
> > this case /home/httpd, and chowned it to apache:apache. I'm still
> > getting the
> > same error.
> >
> > Thanks,
> > Dan
> >
> >
> >
> > Quoting bbonkosk@tampabay.rr.com:
> >
> > > Format of /etc/passwd is:
> > > login:password:UID:GID:RealName:HomeDir:HomeShell
> > >
> > > So, sounds like your HomeSHell for user apache is: /usr/sbin/apache
> > > and it does not want you to execute that, if it exists?
> > >
> > >
> > > And for the other users, I would make sure they have a valid
> > home directory,
> > > and that /bin/bash is their path.
> > >
> > > -Brad
> > > ----- Original Message -----
> > > From: Dan Falcone <dan@falconeweb.net>
> > > Date: Thursday, October 14, 2004 3:41 pm
> > > Subject: [gentoo-user] su problems
> > >
> > > > I'm trying to install bugzilla and need to su to apache, but I'm
> > > > having some
> > > > weird problems with su. I can su root fine, but once there I
> > > > can't su to
> > > > anyone but root. Here's some output:
> > > >
> > > > # su apache
> > > > apache: /usr/sbin/apache: cannot execute binary file
> > > > # su someuser
> > > > someuser: someuser: No such file or directory
> > > >
> > > > The same thing happens no matter what switches I pass. I checked
> > > > /etc/passwdand made sure the shell is set correctly, but other
> > > > than that I don't know what
> > > > to do. Thanks in advance for your help!
> > > >
> > > > -Dan
> > > >
> > > >
> > > >
> > > >
> > > > --
> > > > gentoo-user@gentoo.org mailing list
> > > >
> > > >
> > >
> > >
> > > --
> > > gentoo-user@gentoo.org mailing list
> > >
> > >
> >
> >
> >
> >
> > --
> > gentoo-user@gentoo.org mailing list
> >
> >
>
>
> --
> gentoo-user@gentoo.org mailing list
>
>




--
gentoo-user@gentoo.org mailing list