Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Root users shell == no existant shell /bin/bash

1 view
Skip to first unread message

brando...@ntscom.com

unread,
Jul 8, 2004, 11:36:59 AM7/8/04
to
I made a mistake setting my shell and have set the root users shell to
/bin/bash instead of /bin/sh. I am curiuos if anyone knows how to fix this.
The machines is FreeBSD 4.8-RELEASE-p4 and does not have sudo only su.
_______________________________________________
freebsd-...@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-security
To unsubscribe, send any mail to "freebsd-securi...@freebsd.org"

brando...@ntscom.com

unread,
Jul 8, 2004, 11:49:30 AM7/8/04
to
For some reason su -c relates to "class" not "command" as in linux. I know
about the booting into single user mode also. This happends to be the
primary dns server and our secondary doesn't have the capacity to handle all
the queries. Any other suggestions?

Thanks in advance.

si...@freebsd.org

unread,
Jul 8, 2004, 11:50:35 AM7/8/04
to

--tjCHc7DPkfUGtrlw
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On 2004.07.08 10:29:58 -0500, Brandon Grace wrote:
> I made a mistake setting my shell and have set the root users shell to

> /bin/bash instead of /bin/sh. I am curiuos if anyone knows how to fix thi=


s.
> The machines is FreeBSD 4.8-RELEASE-p4 and does not have sudo only su.

Just go to single user mode [1] and correct it.

[1] http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/boot-init.htm=
l#BOOT-SINGLEUSER

--=20
Simon L. Nielsen
FreeBSD Documentation Team

--tjCHc7DPkfUGtrlw
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (FreeBSD)

iD8DBQFA7WtKh9pcDSc1mlERAkjgAKCzCDE2ihWRqhkwG/FV7F84y+DYTACgvR3I
jkoMJi7+BcM0dkdJfkxH6R4=
=P0NZ
-----END PGP SIGNATURE-----

--tjCHc7DPkfUGtrlw--

ta...@el.ntu-kpi.kiev.ua

unread,
Jul 8, 2004, 5:32:35 PM7/8/04
to
On Thu, 8 Jul 2004, Brandon Grace wrote:
> I made a mistake setting my shell and have set the root users shell to
> /bin/bash instead of /bin/sh. I am curiuos if anyone knows how to fix this.
> The machines is FreeBSD 4.8-RELEASE-p4 and does not have sudo only su.
How about 'su -m' ?

--

Best regards,
Taras Y. NIZHNIK, AKA Taren, XN7211-XTF, TYN-UANIC, TYN1-RIPE

jean-pierr...@cyber-networks.fr

unread,
Jul 9, 2004, 1:48:03 AM7/9/04
to

--=-oLL4nkW6vSiHXSKQChCW
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

On Thu, 2004-07-08 at 23:23, Taras Y. NIZHNIK wrote:
> On Thu, 8 Jul 2004, Brandon Grace wrote:
> > I made a mistake setting my shell and have set the root users shell to

> > /bin/bash instead of /bin/sh. I am curiuos if anyone knows how to fix t=


his.
> > The machines is FreeBSD 4.8-RELEASE-p4 and does not have sudo only su.
> How about 'su -m' ?

"su -m" will be a solution only if "/bin/bash" is a valid shell and the
caller is root :

"The invoked shell is your login shell, and no directory changes are
made. As a security precaution, if the target user's shell is a
non-standard shell (as defined by getusershell(3)) and the caller's
real uid is non-zero, su will fail."

But apparently, Brandon can't login anymore with "root" account because
"/bin/bash" doesn't exist (so isn't a valid shell...).

--=20
Jean-Pierre FORCIOLI OpenPGP: 1024D/CF173713
Cyber Networks http://www.cyber-networks.fr/
Tl : +33 (0)1 42 04 95 89 Fax : +33 (0)1 42 04 95 87

--=-oLL4nkW6vSiHXSKQChCW
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: This is a digitally signed message part

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (FreeBSD)

iD8DBQBA7jFQaKwq8c8XNxMRAivrAJ4kIX759foMlTISJePcQ5wccee+iACgui6t
4ET+DgqT/rzCJ07J/vR1R2Y=
=Zh71
-----END PGP SIGNATURE-----

--=-oLL4nkW6vSiHXSKQChCW--

and...@kommandoraden.info

unread,
Jul 9, 2004, 5:59:50 AM7/9/04
to

...and I gather that "su - toor" doesn't work either for some reason or other?

mar...@roble.com

unread,
Jul 9, 2004, 1:00:06 PM7/9/04
to
"Peter C. Lai" wrote:
> as a rule of thumb, you're probably superuser way too much if you
> develop an urge to change it shell anyway.

Where do people come up with these folk "rules"? I spend all day
working in various root shells as part of my job. Couldn't do it
otherwise.

> toor has a disabled (*) password by default. What Brannon should have done was
> set a password for toor in the beginning, without mucking around with root's
> shell.

In 8 years of BSD administration I've never seen the toor account
used. IMO, as a matter of security, KIS, and for improved
cross-platform compatibility it should be removed from the distribution.

--
Roger Marquis
Roble Systems Consulting
http://www.roble.com/

piec...@argolis.org

unread,
Jul 9, 2004, 3:19:30 PM7/9/04
to
On Fri, 9 Jul 2004, Roger Marquis wrote:

> Where do people come up with these folk "rules"? I spend all day
> working in various root shells as part of my job. Couldn't do it
> otherwise.

It depends on what type of work you're doing, I suppose. The idea is you
should only use root for things that are absolutely necessary. In theory,
you should read man pages, investigate everything, and pull up a second
shell as root just it issue commands with it. The reasoning is if there's
a bug in a program (like man, or lynx, netscape) you could hose the whole
system up if you're root (or get it infected). On the less paranoid side,
a mistype as root could have rather bad consequences.


--
Matt Piechota

0 new messages