Visit Our UNIX and Linux User Community


executing .profile


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers executing .profile
# 1  
Old 11-12-2002
executing .profile

AIX 4.3.3

I am having trouble when logging into the system as userA. It does not seem that the $HOME/.profile is executing. I have checked to make sure the .profile exists in userA's home directory, belongs to userA, and has the file permissions 740. I know the .profile is not being executed because there are some environement variables (including PS1 to set the prompt) that are being exported in the .profile but are not showing up when I echo them at the command line. The funny thing is that when I do "su - userA" from another user, the .profile does get executed, and all the environment variables show up as expected. Anybody have any ideas?
# 2  
Old 11-12-2002
I just have a few questions.

Was there a point when your .profile was working? Has anything changed since that time? Do any other users have this same problem or is it isolated to this one user? Is this an application or normal user?

Here are a few steps to try.

1) Copy the template .profile from /etc/skel/.profile, if you have one, into place and edit as you have your .profile configured.

2) Maybe you can mv another user's .profile into place and chmod/chown it to your user and see what happens.

3) As a last resort, alas, this may be a drastic step, but I would save any user data and remove and recreate this userID. I have seen cases of gremlins infecting a system where a user's ID is so screwed up that only blowing it away and recreating them would fix the problem.

Let me know what happens.
Smilie
# 3  
Old 11-12-2002
The .profile for this user never did seem to work upon logging into the system. userA is the only user on the system with this problem.

-------------------------------------------------------------------------------
1) Copy the template .profile from /etc/skel/.profile, if you have one, into place and edit as you have your .profile configured.
-------------------------------------------------------------------------------
I don't have an /etc/skel directory, but I have done the above with the /etc/profile without success.


---------------------------------------------------------------------------------
2) Maybe you can mv another user's .profile into place and chmod/chown it to your user and see what happens.
--------------------------------------------------------------------------------
I already tried this suggestion before putting up the post, but had no success.

---------------------------------------------------------------------------------
3) As a last resort, alas, this may be a drastic step, but I would save any user data and remove and recreate this userID. I have seen cases of gremlins infecting a system where a user's ID is so screwed up that only blowing it away and recreating them would fix the problem.
---------------------------------------------------------------------------------
It may come to this if I can't figure out what the problem is.

Thanks for your suggestions ! !
# 4  
Old 11-12-2002
Put a statement like "echo in .profile" as the very first line and see if that gets printed at login time. To run .profile, the shell must read it. Reading it will update the atime in the inode. You can see this with "ls -lu". Does the access time change? If so, it was read.
# 5  
Old 11-12-2002
I did try to use an echo when I was trying to debug the problem before the original post was put up, but it did not show up when logging directly into the system by userA. The "ls -alu" shows that the profile was not executed.

I have noticed something since my first post, though. If I log into the system with a command line login, the .profile is executed. When logging in at the X prompt, and then opening a terminal window, I see that the .profile has not been run. Does using X change how/when the .profile is executed?
# 6  
Old 11-13-2002
Not sure if AIX has this but on Solaris there is a .dtprofile which has only one real use - to set a DTSOURCEPROFILE variable to false or true - if false (the default), the .profile is not sourced. If true, then the profile is sourced. The .dtprofile is in each users home directory (normally copied when first starting CDE the first time).

The following link should explain it for AIX.AIX OS - modifying desktop profiles

Last edited by RTM; 11-13-2002 at 11:28 AM..
# 7  
Old 11-13-2002
Thanks, RTM!! I looked in the $HOME/.dtprofile, and the line "DTSOURCEPROFILE=true" was commented out. I uncommented the line, and all now works well.
 

Previous Thread | Next Thread
Test Your Knowledge in Computers #70
Difficulty: Easy
Unix was developed in AT&T's Bell Labs in the mid-to-late 1950's.
True or False?

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Profile

how to copy the profile of my user to my user Id in unix (2 Replies)
Discussion started by: ramkumar15
2 Replies

2. UNIX for Dummies Questions & Answers

Executing profile from any directory other than $HOME

Is there a way to run the profile which is not in $HOME directory? then whats the command for that? (1 Reply)
Discussion started by: SKhan
1 Replies

3. Infrastructure Monitoring

trap in etc/profile and user .profile

Hello I really wonder what's trap in etc/profile and in each user .profile. I try to google for it but I think I have no luck. Mostly hit is SNMP traps which I think it is not the same thing. I want to know ... 1. What's a "trap 2 3" means and are there any other value I can set... (4 Replies)
Discussion started by: Smith
4 Replies

4. UNIX for Dummies Questions & Answers

difference between /etc/profile and .profile?

What is the difference between /etc/profile and .profile? (5 Replies)
Discussion started by: gehlnar
5 Replies

5. UNIX for Dummies Questions & Answers

Where can I read about the difference between "..profile" and ".profile"

Hi I know from reading O Riley's Classic Shell Scripting' that the .profile file is " the shells configuration file" but I am unable to find a reference to what "..profile" means. I have searched on the net, Sams Teach Yourself Unix, Unix Visual Quickstart Guide and Linux in a Nutshell. I have... (2 Replies)
Discussion started by: zorrokan
2 Replies

6. SCO

Difference between .profile and .~/.profile

what is the difference between these two lines, if we use it in korn shell script: .profile .~/.profile (3 Replies)
Discussion started by: maneesh mehta
3 Replies

7. Shell Programming and Scripting

Executing .profile from perl script

Hi, How can i execute .profile from a perl script I need this - i am trying to run perl script from crontab and it looses the environment variables Please provide help Your help is greatly appreciated Thanks (1 Reply)
Discussion started by: prekida
1 Replies

8. UNIX for Advanced & Expert Users

executing .profile with ssh

Hi, How do I get all my profile settings when connecting with ssh? (5 Replies)
Discussion started by: rein
5 Replies

9. UNIX for Dummies Questions & Answers

changed .profile but didnt ./.profile, yet reflected changes

hi , i added ls -F to .profile. and i need to do ./.profile for the effect to take effect BUT i didnt and YET the next day when i came to work and log in, the changes took effect. i am on aix. please explain.. thanks (4 Replies)
Discussion started by: yls177
4 Replies

10. UNIX for Dummies Questions & Answers

why i have local.profile, local.cshrc,local.login instead of .profile, .login ?

Hello again ! Thanks for response of my first question. there is my second quesiton why i have local.profile instead of .profile file ? my all files in pwd shoes local. before any file. is anybody can tell me about that ? Thanks Abid Malik (5 Replies)
Discussion started by: abidmalik
5 Replies

Featured Tech Videos