NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

getlogin, su, and passwd


Consider the following scenario:

$ whoami
$ su - jdoe
$ whoami
$ passwd
Changing password for jschauma.
Old Password:

That is, passwd(1) will act on the current login name as returned by
getlogin(2), regardless of whatever the current (effective or real) UID
may be.

This came as a surprise to me.

Brief testing suggests that at least some other platforms do not behave
this way.

Bug or feature?


Attachment: pgp7hgQXZdNEG.pgp
Description: PGP signature

Home | Main Index | Thread Index | Old Index