Re: FreeBSD 7.0-RELEASE-i386 will changing root shell break anything?

2009-01-10 Thread Jerry McAllister
On Fri, Jan 09, 2009 at 08:46:54PM -0500, Garance A Drosihn wrote:

 At 2:09 PM -0800 1/4/09, David Christensen wrote:
 
 I have changed the root shell to Bash on another machine I use as a CVS
 server and haven't noticed any issues yet, but I've been wondering if
 I'm setting myself up for problems by doing so.
 
 
 Does anybody know if it's okay to change the root shell on FreeBSD
 7.0-RELEASE-i386?

Why do that?
Just create your own root account, put what you want for a shell
on that account and use it.

Use vipw.   Copy the root line and then change the _second_ one
to be your own root id- say,  Rgad  - and make a loging in directory 
for it.  Change the directory part of the pw entry to be that and
the the shell to be what you want.   

Then change the password to be what you want or use some pwvault utility
or whatever.   Just make sure you specify the second root account  (Rgad)
when doing so or it will change the real root's password.

jerry


 
 What I do is add the following lines to /root/.login :
 
 if ($?prompt) then
if ( -x /usr/local/bin/bash ) then
   # echo Switching to bash
   setenv SHELL /usr/local/bin/bash
   exec /usr/local/bin/bash -login
endif
 endif
 
 I've been doing this for at least 10 years.  I haven't had any
 problems with it, but Your Mileage Might Vary.
 
 -- 
 Garance Alistair Drosehn=   g...@gilead.netel.rpi.edu
 Senior Systems Programmer   or  g...@freebsd.org
 Rensselaer Polytechnic Instituteor  dro...@rpi.edu
 ___
 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


Re: FreeBSD 7.0-RELEASE-i386 will changing root shell break anything?

2009-01-10 Thread Lowell Gilbert
David Christensen dpchr...@holgerdanske.com writes:

 freebsd-questions:

 I'm building a fresh Amanda server using FreeBSD 7.0-RELEASE-i386:

  
 http://portsmon.freebsd.org/portoverview.py?category=miscportname=amand
 a-server


 Most of my software background is GNU/Linux.  I would prefer using the
 Bash shell, but the default FreeBSD shell for root appears to be the C
 shell:

 p3450# echo $SHELL
 /bin/csh


 I have changed the root shell to Bash on another machine I use as a CVS
 server and haven't noticed any issues yet, but I've been wondering if
 I'm setting myself up for problems by doing so.


 Does anybody know if it's okay to change the root shell on FreeBSD
 7.0-RELEASE-i386?

Assuming you build the shell statically linked, and put it in the root
partition, you're unlikely to have any trouble.  

However:
 - that is what the toor user is for
 - in my own opinion, anyone who cares what shell root runs is probably
   spending too much time running as root

-- 
Lowell Gilbert, embedded/networking software engineer, Boston area
http://be-well.ilk.org/~lowell/
___
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


Re: FreeBSD 7.0-RELEASE-i386 will changing root shell break anything?

2009-01-09 Thread Garance A Drosihn

At 2:09 PM -0800 1/4/09, David Christensen wrote:


I have changed the root shell to Bash on another machine I use as a CVS
server and haven't noticed any issues yet, but I've been wondering if
I'm setting myself up for problems by doing so.


Does anybody know if it's okay to change the root shell on FreeBSD
7.0-RELEASE-i386?


What I do is add the following lines to /root/.login :

if ($?prompt) then
   if ( -x /usr/local/bin/bash ) then
  # echo Switching to bash
  setenv SHELL /usr/local/bin/bash
  exec /usr/local/bin/bash -login
   endif
endif

I've been doing this for at least 10 years.  I haven't had any
problems with it, but Your Mileage Might Vary.

--
Garance Alistair Drosehn=   g...@gilead.netel.rpi.edu
Senior Systems Programmer   or  g...@freebsd.org
Rensselaer Polytechnic Instituteor  dro...@rpi.edu
___
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


Re: FreeBSD 7.0-RELEASE-i386 will changing root shell break anything?

2009-01-06 Thread Frank Shute
On Sun, Jan 04, 2009 at 02:09:03PM -0800, David Christensen wrote:

 freebsd-questions:
 
 I'm building a fresh Amanda server using FreeBSD 7.0-RELEASE-i386:
 
  
 http://portsmon.freebsd.org/portoverview.py?category=miscportname=amand
 a-server
 
 
 Most of my software background is GNU/Linux.  I would prefer using the
 Bash shell, but the default FreeBSD shell for root appears to be the C
 shell:
 
 p3450# echo $SHELL
 /bin/csh
 
 
 I have changed the root shell to Bash on another machine I use as a CVS
 server and haven't noticed any issues yet, but I've been wondering if
 I'm setting myself up for problems by doing so.
 
 
 Does anybody know if it's okay to change the root shell on FreeBSD
 7.0-RELEASE-i386?

I change my root shell to pdksh. It's statically linked and I copy it
from /usr/local/bin to /bin.

In single user mode you're prompted for a shell (/bin/sh is the
default) so I usually use that.

I've never had any problems (famous last words ;) Just have to
remember to copy the executable to the root filesystem if your shell
gets upgraded.

What you don't want to do is overwrite /bin/sh with /bin/bash or
anything like that. The boot up scripts depend on /bin/sh and although
bash is meant to be Bourne compatible, I wouldn't trust it myself to
bring up the system without problems.

 
 
 TIA,
 
 David

Regards,

-- 

 Frank 


 Contact info: http://www.shute.org.uk/misc/contact.html 

___
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 7.0-RELEASE-i386 will changing root shell break anything?

2009-01-04 Thread David Christensen
freebsd-questions:

I'm building a fresh Amanda server using FreeBSD 7.0-RELEASE-i386:

 
http://portsmon.freebsd.org/portoverview.py?category=miscportname=amand
a-server


Most of my software background is GNU/Linux.  I would prefer using the
Bash shell, but the default FreeBSD shell for root appears to be the C
shell:

p3450# echo $SHELL
/bin/csh


I have changed the root shell to Bash on another machine I use as a CVS
server and haven't noticed any issues yet, but I've been wondering if
I'm setting myself up for problems by doing so.


Does anybody know if it's okay to change the root shell on FreeBSD
7.0-RELEASE-i386?


TIA,

David

___
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


Re: FreeBSD 7.0-RELEASE-i386 will changing root shell break anything?

2009-01-04 Thread Modulok
 Does anybody know if it's okay to change the root shell?

A topic of debate, but yes it is okay to change the root shell, but
there are some things to know...

Some people fret about the idea that shells like bash are not on the
root partition and are usually dynamically linked to libraries which
reside on /usr and are therefore not available in single-user mode.
(One could install a static version of bash to avoid this.)
Additionally, FreeBSD prompts the user for the path to the desired
shell when going into single-user mode. Shells like sh and tcsh, while
dynamically linked, their libs reside on the root partition. If that
isn't enough, statically linked shells exist in /rescue and therefore
should always be available. Furthermore, the installation CD can be
booted from and can provide an emergency repair shell.

So yes, there is no technical reason you cannot change the root shell.
Just be aware that a default bash install will not be available in
single-user mode.

But... best security practices dictate that you should not be using
the root shell. If you're using the root shell often enough to find
the default shell inconvenient, you should consider using something
like sudo and a regular user account instead. You can use the builtin
'su' command with the '-m' flag to preserve the environment of the
current user, while elevating your privileges. The shell used will be
the login shell of the user issuing the 'su' command. Only members of
the group 'wheel' may issue the 'su' command.

-Modulok-

On 1/4/09, David Christensen dpchr...@holgerdanske.com wrote:
 freebsd-questions:

 I'm building a fresh Amanda server using FreeBSD 7.0-RELEASE-i386:


 http://portsmon.freebsd.org/portoverview.py?category=miscportname=amand
 a-server


 Most of my software background is GNU/Linux.  I would prefer using the
 Bash shell, but the default FreeBSD shell for root appears to be the C
 shell:

 p3450# echo $SHELL
 /bin/csh


 I have changed the root shell to Bash on another machine I use as a CVS
 server and haven't noticed any issues yet, but I've been wondering if
 I'm setting myself up for problems by doing so.


 Does anybody know if it's okay to change the root shell on FreeBSD
 7.0-RELEASE-i386?


 TIA,

 David

 ___
 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


Re: FreeBSD 7.0-RELEASE-i386 will changing root shell break anything?

2009-01-04 Thread matt donovan
On Sun, Jan 4, 2009 at 5:09 PM, David Christensen dpchr...@holgerdanske.com
 wrote:

 freebsd-questions:

 I'm building a fresh Amanda server using FreeBSD 7.0-RELEASE-i386:


 http://portsmon.freebsd.org/portoverview.py?category=miscportname=amand
 a-serverhttp://portsmon.freebsd.org/portoverview.py?category=miscportname=amanda-server


 Most of my software background is GNU/Linux.  I would prefer using the
 Bash shell, but the default FreeBSD shell for root appears to be the C
 shell:

p3450# echo $SHELL
/bin/csh


 I have changed the root shell to Bash on another machine I use as a CVS
 server and haven't noticed any issues yet, but I've been wondering if
 I'm setting myself up for problems by doing so.


 Does anybody know if it's okay to change the root shell on FreeBSD
 7.0-RELEASE-i386?


 TIA,

 David

 ___
 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


well you will lock yourself out of the system if you uninstall bash or bash
breaks. I would enable toor just in case
___
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