ccea3@rivm.UUCP (Adri Verhoef) (05/05/89)
The command 'ls -n' fails with '/etc/passwd file cannot be opened for reading' if the password file is missing, or it fails with '/etc/group file cannot be opened for reading' if the group file is missing. -Flame on- 'ls -n' does not need to open any password or group file! -Flame off- -- 19:89 - TIME TO WAKE UP!
jeff@softop.UUCP (Jeff) (05/12/89)
In article <1326@rivm05.UUCP>, ccea3@rivm.UUCP (Adri Verhoef) writes: > The command 'ls -n' fails with '/etc/passwd file cannot be > opened for reading' if the password file is missing, or it > fails with '/etc/group file cannot be opened for reading' > if the group file is missing. > > -Flame on- > 'ls -n' does not need to open any password or group file! > -Flame off- I had never considered this before. Inspection of inode.h (Xenix 2860 shows that the inode contains uid & gid, not username and groupname. Surely then 'ls -n' is the only version that should work if the files ARE missing????? -- ---------------------------------------------------------------------------- | Jeff Tate | 2425 Pandora Street, Vancouver, BC, Canada | | van-bc!softop!jeff | (604) 254-4583 | ----------------------------------------------------------------------------
guy@auspex.auspex.com (Guy Harris) (05/16/89)
>I had never considered this before. Inspection of inode.h (Xenix 2860 >shows that the inode contains uid & gid, not username and groupname. Well, you should have looked at "stat.h", since "ls" looks at what it gets back from "stat" - it doesn't look directly at the inode - but you get the same answer, and will get it for any other version of UNIX as well. >Surely then 'ls -n' is the only version that should work if the files >ARE missing????? Yes, but so what? He said, quite specifically: 'ls -n' does not need to open any password or group file! he didn't say anything about "ls" without the "-n" flag or with other flags. I presume he has a legitimate reason for wanting to do an "ls -n" on a system with either "/etc/passwd" or "/etc/group" missing....