*BSD News Article 65738


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!news.mira.net.au!news.vbc.net!alpha.sky.net!winternet.com!newsfeed.concentric.net!news.texas.net!news.kei.com!newsfeed.internetmci.com!howland.reston.ans.net!math.ohio-state.edu!news.cyberstore.ca!nntp.cs.ubc.ca!cs.ubc.ca!unixg.ubc.ca!orca.osg.gov.bc.ca!passer.osg.gov.bc.ca!cschuber
From: cschuber@passer.osg.gov.bc.ca (Cy Schubert - ITSD Open Systems Group)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: 'su' in FreeBSD sucks!!!
Date: 12 Apr 1996 21:00:57 GMT
Organization: BC Systems
Lines: 54
Message-ID: <4kmga9$211@orca.osg.gov.bc.ca>
References: <4kdduc$3bb@vixen.cso.uiuc.edu>
NNTP-Posting-Host: passer.osg.gov.bc.ca
X-Newsreader: TIN [version 1.2 PL2]

Hee-Joon Park (h-park7@ehsn12.cen.uiuc.edu) wrote:
> hello...

> I just installed FreeBSD yesterday, and very
> happy with what I've seen so far.

> I already had Linux for quite some time, now
> I have everything(Don't have DOS though)

> Here's the problem.
> Developers for FreeBSD were I guess, security-conscious, looking 
> at the su program.
> Only certain users belonging to a certain group(say, wheel, for example)
> can run su.

This is a BSD feature.  Even SunOS 4.x does this.

> Unfortunately, not knowing this "security-conscious" feature of
> su in FreeBSD ahead of time, i did something silly.
> I logged as root, then ran "chsh" and
> changed the shell to /bin/tcsh, but problem is that i assumed there 
> was /bin/tcsh(being lazy), not necessirily didn't check it!
> (guess i'll do that next time for sure) and guess what?

> I can't log in as root anymore!
> even though I provide right passwd, i've been kicked out
> BSD saying it can't find such shell(yea yea... I now know
> tcsh isn't located in /bin/!)

Boot up your install disk and start a shell.  Then edit the password file
to put in the appropriate shell you want.  Then reboot.

I've found changing root's shell somewhat dangerous.  If you add the following
to root's .profile (assuming root's shell is /bin/sh) you can use any
shell you want.

if [ -x /bin/bash ]; then
    exec /bin/bash
else
    echo /bin/bash not found using default shell of $SHELL
fi

I use this on all the machines I manage at work.  It's been a lifesaver in
more than one occasion.


Regards,                       Phone:  (604)389-3827
Cy Schubert                    OV/VM:  BCSC02(CSCHUBER)
Open Systems Support          BITNET:  CSCHUBER@BCSC02.BITNET
ITSD                        Internet:  cschuber@uumail.gov.bc.ca
                                       cschuber@bcsc02.gov.bc.ca

		"Quit spooling around, JES do it."