Go Back   The UNIX and Linux Forums > Operating Systems > AIX
Search Forums:



AIX AIX is IBM's industry-leading UNIX operating system that meets the demands of applications that businesses rely upon in today's marketplace.

Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 02-13-2009
Registered User
 

Join Date: Apr 2008
Location: Michigan,USA
Posts: 136
Thanks: 0
Thanked 0 Times in 0 Posts
Arrow 3004-505 Cannot set process environment

Guys

I have an AIX 5.3 box.I am getting following messages if i try to switch to any non root user.

bash-3.00# su - sys
3004-505 Cannot set process environment.
bash-3.00# su - daemon
3004-505 Cannot set process environment.
bash-3.00# su - adm
3004-505 Cannot set process environment.
bash-3.00# su - nobody
3004-505 Cannot set process environment.
bash-3.00# su - guest
3004-505 Cannot set process environment.
bash-3.00# su - uucp
3004-505 Cannot set process environment.
bash-3.00# su - lp
3004-614 Unable to change directory to "/var/spool/lp".
You are in "/home/guest" instead.
3004-505 Cannot set process environment.
bash-3.00# su - lpd
3004-505 Cannot set process environment.
bash-3.00# su - user1
3004-505 Cannot set process environment.
bash-3.00# su - user2
3004-505 Cannot set process environment.

only su - bin is working
Why is this happening?

Regards
Abhijeet
Sponsored Links
    #2  
Old 02-13-2009
bakunin bakunin is online now Forum Staff  
Bughunter Extraordinaire
 

Join Date: May 2005
Location: In the leftmost byte of /dev/kmem
Posts: 2,272
Thanks: 9
Thanked 121 Times in 92 Posts
The problem is some privilege problem along the login procedure. Some file or directory, which has to be accessed during the login do not have the read-bit set for users. root (and for some reason also bin) can overcome this (maybe the file/directory is owned by bin and root can read anything anyways), but normal users cannot.

Btw., entering your error message "3004-505 Cannot set process environment." into google (which is always a good idea to try) produces this link as the first hit:


Login Problems with Non-Root Users in AIX

which would have provided you with the same explanation and even a procedure on how to correct the problem.

I hope this helps.

bakunin
Sponsored Links
    #3  
Old 02-16-2009
Registered User
 

Join Date: Apr 2008
Location: Michigan,USA
Posts: 136
Thanks: 0
Thanked 0 Times in 0 Posts
agreed.google always helps.
thanks for the link.I went thru it already.

in my case ,i have got the explanation but not the resolution.
whatever checks mentioned here i have done and every file seems to be in place.
    #4  
Old 02-17-2009
bakunin bakunin is online now Forum Staff  
Bughunter Extraordinaire
 

Join Date: May 2005
Location: In the leftmost byte of /dev/kmem
Posts: 2,272
Thanks: 9
Thanked 121 Times in 92 Posts
Go through the possible sources of your problem step by step:

1. check all the mountpoints where filesystems in the rootvg are mounted. The should at least have the execute bits set (filemode 111), but it is good practice to set them at 777 anyways.

2. check all the files not only if they are in place but also if the have the correct ownership/filemode:

/etc/environment
/etc/passwd
/etc/groups
/etc/profile

and probably some more. Examine the login process thoroughly to find out which files are accessed during it. Then make sure all these files have the read-bit set for world.

I hope this helps.

bakunin
Sponsored Links
    #5  
Old 02-20-2009
Registered User
 

Join Date: Dec 2006
Location: Maryland
Posts: 163
Thanks: 0
Thanked 0 Times in 0 Posts
probably the shell for the user i.e. the last column with delimiter : in the /etc/passwd file is wrong. Probably you moved a user from hpux but cut+paste method and caried over /sbin/sh .. It does not exist in AIX
Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
script to monitor process running on server and posting a mail if any process is dead pradeepmacha Shell Programming and Scripting 13 03-06-2009 06:33 AM
Getting another process' environment DreamWarrior Programming 3 04-02-2008 01:31 PM
Killing of a process and send a mail if the process doesnot come up within 2 minutes Prince89 Shell Programming and Scripting 1 02-15-2008 06:10 PM
Reset environment - ".. /etc/.environment dev_env" zzwu3591 UNIX for Advanced & Expert Users 7 01-12-2007 08:27 AM
Login Error 3004-304 dino_bekas AIX 0 03-14-2005 10:57 PM



All times are GMT -4. The time now is 10:38 PM.