?
Solved

problem with whoami

Posted on 2005-05-11
7
Medium Priority
?
1,375 Views
Last Modified: 2013-11-17
Hi,
   On one of my AIX machines the prompt says

george:/home/amit<>

but when I issue a whoami

I get an error "The user name is not recognized" ?

any suggestions to resolve this
0
Comment
Question by:anshuma
  • 2
  • 2
  • 2
  • +1
7 Comments
 

Author Comment

by:anshuma
ID: 13981642
If I do

echo $user

then it gives the correct answer

0
 
LVL 46

Accepted Solution

by:
Kent Olsen earned 1000 total points
ID: 13983134
Hi anshuma,

Check the /etc/passwd file.  This user may be been deleted during the session, or modified to have a different user index.


Good Luck!
Kent
0
 

Author Comment

by:anshuma
ID: 13986186
Hi,
   I looked at the etc/passwd for this machine and it doesn't have the user listed in that. However I opened the same file on another machine and it also had exactly identical file but there I can use whoami with no errors
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 46

Expert Comment

by:Kent Olsen
ID: 13986784

Back up a second....

The user name is not in the /etc/passwd file but you can log in to the machine?

Methinks that you missed something.  Assuming that your user name is 'amit', try this:

grep amit /etc/passwd

And post your findings from both machines.

One other item -- are you running CSM?  (Cluster Server Manager)


Kent
0
 
LVL 62

Assisted Solution

by:gheist
gheist earned 600 total points
ID: 14004921
pwdchk etc fixes passwd files
0
 
LVL 1

Assisted Solution

by:moshkino
moshkino earned 400 total points
ID: 14006974
Maybe some other way of authentication is used, not just /etc/passwd

do getent passwd | grep <username> on both systems. And and see if the user is there.
0
 
LVL 62

Expert Comment

by:gheist
ID: 14007263
id
id -a
who am i

esp on ssh connection with su or x11 or so
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In tuning file systems on the Solaris Operating System, changing some parameters of a file system usually destroys the data on it. For instance, changing the cache segment block size in the volume of a T3 requires that you delete the existing volu…
I promised to write further about my project, and here I am.  First, I needed to setup the Primary Server.  You can read how in this article: Setup FreeBSD Server with full HDD encryption (http://www.experts-exchange.com/OS/Unix/BSD/FreeBSD/A_3660-S…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Suggested Courses
Course of the Month17 days, 7 hours left to enroll

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question