Thanks in advance.
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--
--
Best regards,
Taras Y. NIZHNIK, AKA Taren, XN7211-XTF, TYN-UANIC, TYN1-RIPE
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 I gather that "su - toor" doesn't work either for some reason or other?
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/
> 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