Problem setting up Bash user account


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users Problem setting up Bash user account
# 1  
Old 10-27-2006
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 ?
# 2  
Old 10-27-2006
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.
# 3  
Old 10-27-2006
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
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

New user account problem Ubuntu 12.04

Does anyone have an idea why it is not possible to logon to a newly created user account in Ubuntu 12.04. Is it perhaps a bug with this distro? On another machine, but running 12.10 there is no such problem. Accounts have been created with adduser and with GUI. It makes no difference! The... (3 Replies)
Discussion started by: Royalist
3 Replies

2. Solaris

Is there a difference between setting a user as nologin and setting it as a role?

Trying to figure out the best method of security for oracle user accounts. In Solaris 10 they are set as regular users but have nologin set forcing the dev's to login as themselves and then su to the oracle users. In Solaris11 we have the option of making it a role because RBAC is enabled but... (1 Reply)
Discussion started by: os2mac
1 Replies

3. HP-UX

User account

I need to check actual date a user was disabled on my HP-UX server. Audit is claiming the user account was active during the last audit exercise. (7 Replies)
Discussion started by: cyriac_N
7 Replies

4. Solaris

Help me create new user account

I want create user. That user should be login to any server without asking password. How? tell me in detail. :wall: (3 Replies)
Discussion started by: Navkreddy
3 Replies

5. UNIX for Dummies Questions & Answers

Setting up FTP account

Hi, I am new to the workd of FTP administration. I was asked to make an account on our FTP server so that someone can only download and upload to his home directory. The account is made but what settings/cconfiguration can I verify to ensure that the user has access to his home directory only?... (1 Reply)
Discussion started by: mojoman
1 Replies

6. UNIX for Dummies Questions & Answers

Difference between : Locked User Account & Disabled User Accounts in Linux ?

Thanks AVKlinux (3 Replies)
Discussion started by: avklinux
3 Replies

7. Shell Programming and Scripting

setting account (linux)

hi How can I set an account so that it expires at a particular date? (6 Replies)
Discussion started by: tjay83
6 Replies

8. UNIX for Dummies Questions & Answers

Setting an account to be a non-login account automatically?

Is there a way to easily change an account to be a non login account (NP in the shadow) file? I know I can just edit the file but that is not what we want to do. We use access control software and want to provide a way to set an account to be non-login using simple commands that can be mapped... (0 Replies)
Discussion started by: LordJezo
0 Replies

9. Post Here to Contact Site Administrators and Moderators

user account

hi how to disable the useraccount in aix (should not remove). (1 Reply)
Discussion started by: chomca
1 Replies

10. UNIX for Dummies Questions & Answers

creatin user account

hi all, i m tryin to create a new account on the unix work station. do i use 'useradd' command? can u guyz advice on the usage of 'useradd' command as it can comes with 'useradd -D' or 'useradd -e' thanks :confused: (1 Reply)
Discussion started by: damian
1 Replies
Login or Register to Ask a Question