Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

So did you have root access? I can’t figure out if you attempt to su all the system accounts worked or not.


Nowadays /etc/passwd is world-readable and passwords are in /etc/shadow but perhaps /etc/passwd used to store the hashed passwords as well.


I, of course, did not have root access or any access that I shouldn't have had.

/etc/passwd indeed stored the hashes in SVR3, and there was no such thing as /etc/shadow. I was naive enough not to understand hashes, and so I figured that those jumbled letters in the file had to be the actual passwords, and if "*" was in an entry then "*" was, of course, the password! Why didn't it work?!!?


If you read the source of ‘cat’ and ‘more’ you’ll see that if they are reading /etc/passwd they replace the passwords of system users with ‘*’, unless you are uid 0.

When ‘less’ was created, there was a bug where when you scrolled upwards the passwords would be revealed, so it was decided that the passwords should be replaced with actual asterisks and stored in individual files per-user.

For security, these files were given access rights only for the owning user, and immediately deleted, with an encoded copy of their inode number being stored in /etc/shadow.

Fun fact: forced password changes were initially introduced when disks were getting full and deleted inodes of user password files were due to be overwritten. “For security reasons” was correct but misinterpreted.


> If you read the source of ‘cat’ and ‘more’ you’ll see that if they are reading /etc/passwd they replace the passwords of system users with ‘*’, unless you are uid 0.

That sounds so wrong, anything from a user-written program, `ed`, etc to a symlink/hardlink could read the password.


Sounds wrong because it is wrong, pure unadulterated intentional B.S.; don't know why the commenter decided to yank our chains like this.

I believe there is a meme in chat rooms where trolls get unsuspecting users to reveal their passwords by convincing them that the chat replaces it with "***" and so forth. Perhaps the GP is riffing on this.


Back in the day, not only did /etc/passwd contain (unsalted) hashed passwords, but many publicly accessible hosts were configured to allow anonymous FTP and let you browse the entire fileystem. I would never do this myself, naturally, but people collected those things and run crack on for days to get passwords for accounts.

Man, the internet's no fun anymore.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: