Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

question about sudo

Status
Not open for further replies.

tech123786

Technical User
Nov 13, 2006
31
US
Hello,
I am trying to su - user01 on out aix 5.3 server, then getting error sh: user01: not found.
user01 is already exists on this sever. When I do su user01 then I can login to him. But I need to use su - user01 which I was not able to do so. Any suggetions please.


Thanks
 
The error indicates you're trying to run a program name "user01", or at least that's what sh thinks.

Your topic mentions sudo, but the body says su.

What exactly are you entering that gives you that error?

- Rod



IBM Certified Advanced Technical Expert pSeries and AIX 5L
CompTIA Linux+
CompTIA Security+

A Simple Code for Posting on the Web
 
I logged in as root and trying to su the user "user01" by the command su - user01 and I got that error.
On the other server, I was able to login to user "user01" by the same command.



Thanks
 
Try /usr/bin/su instead. If that works, check for aliases, functions, or items earlier in your PATH that might be masking the real su. ("which su" might help)

If /usr/bin/su gives the same error, check user01's startup files (eg .profile) for errors.

- Rod




IBM Certified Advanced Technical Expert pSeries and AIX 5L
CompTIA Linux+
CompTIA Security+

A Simple Code for Posting on the Web
 
Can you show the contents of /etc/sudoers file ?
 
Are you sure that the /etc/passwd file is not somehow corrupted!?! try looking for the user01 inside the file

cat /etc/passwd | grep user01

or you better check the whole file as well!

There might be something wrong with the user01 environment! like maybe .profile for that user! Check this as well!

Have you tried to su - to another user on that server? Try it and if that works then this will focus the problem to user01 but if it didn't then there might be something wrong with the server environment!

Regards,
Khalid
 
/usr/bin/usrck -n

Will report any (syntax) problems with your user related files.

/usr/bin/lsuser -f user01

Will show you all of user01's attributes, so you can see if they have some sort of funky shell set.

Please let us know when you've solved the problem. :)

- Rod


IBM Certified Advanced Technical Expert pSeries and AIX 5L
CompTIA Linux+
CompTIA Security+

A Simple Code for Posting on the Web
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top