From owner-freebsd-questions Tue Jul 30 18:46:10 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9493737B400 for ; Tue, 30 Jul 2002 18:46:05 -0700 (PDT) Received: from mail2.eagle.ca (mail2.eagle.ca [209.167.16.30]) by mx1.FreeBSD.org (Postfix) with ESMTP id C405843E31 for ; Tue, 30 Jul 2002 18:46:04 -0700 (PDT) (envelope-from lists@brenius.com) Received: from afi (lagwagon-hs.eagle.ca [64.39.177.24]) by mail2.eagle.ca (8.11.3/8.11.3) with SMTP id g6V1j9c61504 for ; Tue, 30 Jul 2002 21:45:09 -0400 (EDT) (envelope-from lists@brenius.com) Message-ID: <049901c23833$fe36d890$7b01a8c0@afi> From: To: Subject: Simpliest & Safest way to utilize bash_profile w/ root Date: Tue, 30 Jul 2002 21:45:47 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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