Operating System - HP-UX
1835346 Members
2481 Online
110078 Solutions
New Discussion

user getting message when logging in

 
SOLVED
Go to solution
KPS
Super Advisor

user getting message when logging in

Hi,

I have a user that when they login, they get the following message:

/bin/mach: Command not found.
Can't set limit.

Also,

When they logout, they get the following message:

ps: unknown user x
USER: Undefined variable.


Would anyone have any idea where I could start to look to see what is causing these problems? Subsequently, this user cannot run certain programs or scripts that they are allowed to run with their permissions. At first I thought it was their .profile, but that looks normal like everyone else's on my 11.11 system. I'm out of ideas.

Thanks,
KPS
10 REPLIES 10
Raj D.
Honored Contributor

Re: user getting message when logging in

Hi KPS ,

Have you defined correct shell and startup profile for this user. Seems incorrect shell and variables defined.

Can you paste the output of
1. cat /etc/passwd | grep username
2. cat ~username/.profile

need to check further,
cheers ,

Raj.
------
" If u think u can , If u think u cannot , - You are always Right . "
James R. Ferguson
Acclaimed Contributor

Re: user getting message when logging in

Hi Ken:

Depending upon the user's default shell, you might find your culprit code in ~/.login and ~./logout.

Regards!

...JRF...
KPS
Super Advisor

Re: user getting message when logging in

I have attached the /etc/passwd entry for this user and also the .profile.


Please see attachment.......
KPS
Super Advisor

Re: user getting message when logging in

All,

I think I'm on to something here. This user used to be setup on an old Sun system and I think some of this is the cause of the problems. When they got rid of this system, nobody ever converted his login to take account the HP system that everyone was migrated over to. I found mention to this /bin/mach made in the login and .logout files. I have taken those out of the equation, and I thought things would work more as expexted. The logout error message has gone away so that's good, but when the user logs on to the HP-UX system, he still gets the error:

/bin/mach: Command not found.
Can't set limit

Still looking for other places where this /bin/mach might be referred to.
Rick Garland
Honored Contributor

Re: user getting message when logging in

Depending on the shell, look in the ~/.login or ~/.profile. If using CDE you may want to look in the users ~/.dtprofile as well.

Couple other files to check

~/.cshrc and/or ~/.kshrc files. If these files exist they will also be executed on login.

Also check the ~/.env file. I see a reference to it in your attachment.
Torsten.
Acclaimed Contributor

Re: user getting message when logging in

Hi Ken,

have a look at the .cshrc for this entry.
The /bin/mach returns machine info on sun, like "sparc". Perhaps used in this case for a message like "you are using a sparc system".

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Raj D.
Honored Contributor

Re: user getting message when logging in

Hi Ken ,

The .profile seems ok , but wonding from where its taking /bin/match , in the error.

"/bin/mach: Command not found.
Can't set limit."

Its C shell , hence ,check for the files
~user/.cshrc and ~user/.login ,

Cheers ,
Raj.


" If u think u can , If u think u cannot , - You are always Right . "
Pete Randall
Outstanding Contributor
Solution

Re: user getting message when logging in

Ken,

Try grepping for /bin/mach in his home directory:

find /home/username -exec grep '/bin/mach' {} \;


Pete

Pete
John E.Ophious
Regular Advisor

Re: user getting message when logging in

G'day Mate,

Lots of good responses from my partners... I just wanted to add that if its hard to track down, you could always just delete the user (saving his/her home directory and files) and re-add the user using the -k /etc/skel option. If the user has basic login files, this shouldn't be a problem. If the user has a very customized setup, you could just keep adding bits and pieces of the old login files in until you find the culprit. Searching the user's home directory for mach is a good idea too and should narrow everything down.

Take it easy partner,

John E. Ophious
John E.Ophious
Regular Advisor

Re: user getting message when logging in

Howdy Ken,

Sounds like someone added a command to your users PATH environmental variable:

PATH=$PATH:/bin/mach
EXPORT PATH


Check out:

User's:
.cshrc
.login
.profile

System:
/etc/csh.login
/etc/profile

Good day mate,

John E. Ophious