3004-505 Cannot set process environment


 
Thread Tools Search this Thread
Operating Systems AIX 3004-505 Cannot set process environment
# 1  
Old 02-13-2009
CPU & Memory 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
# 2  
Old 02-13-2009
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
# 3  
Old 02-16-2009
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
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
# 5  
Old 02-20-2009
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
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Trying to figure out how the environment variables are being set

I just started a new job and I've been tasked with cleaning up the files that set up all the environment variables. The system works as is. What happens is: 1. You log in to the server. 2. You call a file that sets a bunch of environment variables and that displays a list of all the databases... (4 Replies)
Discussion started by: Keyeh
4 Replies

2. Shell Programming and Scripting

Need to SET Environment variables

Hi Could you please tell me how to set environment variables in Unix ksh. And how can acess those varibles in shell scripts ( Please give the code with an example) For my scenario. We have written number of shell scripts with hard coded username and password. But if we want to... (1 Reply)
Discussion started by: shyamu544
1 Replies

3. Shell Programming and Scripting

Set Environment variable from another file

Hi, i have the following env variable. currently i am exporting variable in the same script file. but i need this is in a text file and the scripts need to export this variable from the text file. can you please suggest me. is it possible. export... (6 Replies)
Discussion started by: rsivasan
6 Replies

4. Shell Programming and Scripting

Set environment

Hi, I can run shell script from the command line using $ . set If the run the script inside perl script using $var = system("set"); print $var; This prints 0. This command sets up the environment from command line. But when used inside the shell script or perl script it... (2 Replies)
Discussion started by: sandy1028
2 Replies

5. UNIX for Dummies Questions & Answers

ORACLE_HOME environment variable not set!

hi, i am new to perl: os : Linux i wrote simple perl script to select from table i am getting this error and how to set ORACLE_HOME environment variable : script: #!usr/bin/perl use DBI; use Mail::Sendmail; #use Date::Calc; use MIME::QuotedPrint; use HTML::Entities; use POSIX... (2 Replies)
Discussion started by: prakash.gr
2 Replies

6. Solaris

set environment variable?

I am working with solaris 9 sunBlade150 Box. I Installed a program, need to set the environment variable so that when the executable is entered,it finds the path to the executable. The documentation for the software says: Set the appropriate environment variable: Connect to server failed;... (8 Replies)
Discussion started by: smartgupta
8 Replies

7. Shell Programming and Scripting

How does the environment stay set

I am running this pre-script with a post scripts that needs to share the same variables. How do I keep the environment variable settings for the next script to access from the RMAN Script? Prescript #1 #RMAN Script #!/bin/ksh ORACLE_SID=INVPRD;export ORACLE_SID... (1 Reply)
Discussion started by: gzs553
1 Replies

8. Linux

How do i set environment variable

Hi, I am quite new to Linux. And I have doubt how to set new environment variable with value to a C executable. Let say I have a environment variable $Hack ; I would like to load a value for this variable; so that when the C executable is executed, the $Hack would set the variable value. ... (4 Replies)
Discussion started by: ahjiefreak
4 Replies

9. Shell Programming and Scripting

Help to set the oracle environment????

Hi, I am trying to set the environment for my oracle database. I have 5 database in an unix box. My idea is to create 5 files for each database with the following script on it. After logging into the unix box ...just by typing the database name....the enviornment for the database... (2 Replies)
Discussion started by: castlerock
2 Replies

10. UNIX for Advanced & Expert Users

set environment variable?

Installed a program, need to set the system up so that when the executable is entered, it finds the path to the executable. In Windows, set under system properties, advanced, environmental variables. How do I do this with Unix? Specifically using Solaris 9. I have tried: env... (3 Replies)
Discussion started by: kohoutek
3 Replies
Login or Register to Ask a Question