The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
Google UNIX.COM


UNIX for Advanced & Expert Users Advanced UNIX and Linux questions go here. Expert-to-Expert.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
How do you set up an FTP user account? XZOR UNIX for Dummies Questions & Answers 2 12-07-2006 08:13 AM
Setting an account to be a non-login account automatically? LordJezo UNIX for Dummies Questions & Answers 0 06-16-2006 06:28 AM
HMC User account expired - What now? backslash AIX 0 05-31-2006 02:14 PM
user account chomca Post Here to Contact Site Administrators and Moderators 1 05-22-2006 09:41 AM
bash: setting arrays Kriton UNIX for Dummies Questions & Answers 3 07-20-2001 09:35 AM

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 10-27-2006
Registered User
 

Join Date: Oct 2006
Posts: 1
Problem setting up Bash user account

Hi,

We have a unix user account with login shell as ksh. Now we want to migrate our jobs to a new user account having bash as its login shell.

For the old account we had a .env file which set up a lot of aliases and did a few other useful things. It seems this file was executed the on logging into the account.

However though i have copied the .env to the home directory of the new bash account this file is not executed automatically any more.
Is this something to do with the difference between bash and ksh ?
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 10-27-2006
Registered User
 

Join Date: Aug 2005
Location: Saskatchewan
Posts: 923
bash executes ~/.bashrc on login, not ~/.env. Bash and ksh also have quite different syntax from each other. Depending on it's contents, that .env file may need editing to work in bash.
Reply With Quote
  #3 (permalink)  
Old 10-27-2006
Registered User
 

Join Date: Feb 2005
Location: Broomfield, CO
Posts: 382
Actually it depends on which Linux and which bash. I've been finding newer bash's are loading .profile and not .bashrc. You can leave .env on the account and just add:

Code:
if [ -f ~/.env ]
then
  . ~/.env
fi
If it's an older bash, put it in your ~/.bashrc. If it's newer, put it in your ~/.profile.

Carl
Reply With Quote
Google UNIX.COM
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 08:57 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0