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

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

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.

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

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