0

I´m learning about linux privilege escalation via a writable /etc/passwd file and was wondering how common that actualy is?

Are there any use cases where a regular user might have (or even needs) write access to the /etc/passwd file or is this more of a artificial thing for security courses that is rarely seen in real life?

1 Answer 1

2

Are there any use cases where a regular user might have (or even needs) write access to the /etc/passwd file

No.

Regular users need read access for things like having ls -l print out the owner of a file. That need for read access drove the split where /etc/passwd is readable, but has no password hashes, and /etc/shadow contains those password hashes but should never be readable to anyone but root.

is this more of a artificial thing for security courses that is rarely seen in real life?

Yes. It's an easy way to demonstrate how simple changes can affect security, but writable /etc/passwd isn't something you see 'in the wild'

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .