Date: Tue, 30 Jul 2002 21:45:47 -0400 From: <lists@brenius.com> To: <questions@freebsd.org> Subject: Simpliest & Safest way to utilize bash_profile w/ root Message-ID: <049901c23833$fe36d890$7b01a8c0@afi>
next in thread | raw e-mail | index | archive | help
I am trying to narrow down the "proper" way to get a different shell going with FreeBSD, 4.6 in this case. With simplicity and security in mind... Situation 1) Fresh install of OS, root is csh I think by default. A new account is created and is defaulted to csh. Lets call this username1. username1 will be added to the wheel group. From the console, first up I need to change the default editor for root, by doing: # cd /root # pico (or favourite editor) .cshrc -> change editor to pico Now I want to "chpass" username1, to bash first. # chpass username1 -> which I change to /usr/local/bin/bash Now I create a .bash_profile in /home/username1, with some of the following: # .bash_profile - Bourne Again SHell configuration file for login shells. PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/bin:/usr/local/sbin:/usr/X1 1R6/bin:$HOME/bin; export PATH # file permissions: rwxr-xr-x umask 077 BLOCKSIZE=K; export BLOCKSIZE EDITOR=pico; export EDITOR PAGER=/usr/bin/more; export PAGER # set ENV to a file invoked each time bash is started for interactive use. #ENV=$HOME/.shrc; export ENV # # be paranoid--get warned before overwriting and deleting files :) alias cp='cp -ip' alias mv='mv -i' alias rm='rm -i' # Normal aliases alias h='fc -l' alias j=jobs alias ll='ls -laFo' alias l='ls -l' alias egrep='egrep -i' alias ping='ping -c 5' alias grep='grep -i' alias dir='ls -laFo' # set prompt PS1="\d == [\u@\h]\w # " PS2=">" # search path for cd(1) # CDPATH=.:$HOME What are these for?? Now lets say there are 10 user accounts on the system -- some like bash, some like csh, etc. username1 wants bash for their account and the same bash_profile for when they su and become root, yet they do not want globize their profile when everyone else su's to root. What would be the best way to accomplish this? Thank you!!! P.S. "Situation 2" may become an issue if situation 1 is impossible, stay tuned. :) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?049901c23833$fe36d890$7b01a8c0>