Operating System - HP-UX
1837106 Members
2253 Online
110112 Solutions
New Discussion

userid displayed during ls -l

 
T G Manikandan
Honored Contributor

userid displayed during ls -l

Hello,
Whenever I do an ls -l on the files the userid is displayed.
This is particular to some users.
The user has an entry in the /etc/passwd file.
Even when I execute an id command it just gives me the id and not the username.
Even I tried the 'id -n' command.
Please resolve the issue.
Thanks.
G Manikandan
2 REPLIES 2
Michael Tully
Honored Contributor

Re: userid displayed during ls -l

Hi,

Does the output appear similar to below?

-rw-r--r-- 1 0 3 926 Jun 6 08:30 10498
-rw-r--r-- 1 0 0 23 May 18 16:12 105.sh
-rw-r--r-- 1 0 3 684 Jun 27 08:30 10587
-rw-r--r-- 1 0 3 684 Jun 29 08:30 11060
-rw-r--r-- 1 0 0 23 Jun 5 12:20 112.sh
-rw-r--r-- 1 0 0 25 May 2 09:18 114.sh
-rw-r--r-- 1 0 3 684 Jun 28 08:30 12023
-rw-r--r-- 1 0 3 926 Jun 13 08:30 12581
-rw-r--r-- 1 0 0 23 Jun 5 14:17 132.sh
-rw-r--r-- 1 0 0 23 Jun 29 14:20 140.sh

If so the user may have an alias that uses
ls -n instead of ls -l

-rw-r--r-- 1 root sys 926 Jun 6 08:30 10498
-rw-r--r-- 1 root root 23 May 18 16:12 105.sh
-rw-r--r-- 1 root sys 684 Jun 27 08:30 10587
-rw-r--r-- 1 root sys 684 Jun 29 08:30 11060
-rw-r--r-- 1 root root 23 Jun 5 12:20 112.sh
-rw-r--r-- 1 root root 25 May 2 09:18 114.sh
-rw-r--r-- 1 root sys 684 Jun 28 08:30 12023
-rw-r--r-- 1 root sys 926 Jun 13 08:30 12581
-rw-r--r-- 1 root root 23 Jun 5 14:17 132.sh
-rw-r--r-- 1 root root 23 Jun 29 14:20 140.sh

Regards
Michael
Anyone for a Mutiny ?
T G Manikandan
Honored Contributor

Re: userid displayed during ls -l

Hello,
The problem got resolved.
It was with the permissions of the /etc/passwd file.
I changed it to 400.
It should be 444 by default.
Thanks.
G Manikandan