News for hackers. Stuff that matters.
Re:Don't abuse su for dropping user privileges (2015) by hulitu on Friday May 26, 2023 @04:54PM (#36089402)
> Consider this python sample and assume it’s automatically being run at logon from the .bashrc of a technical account, such as postgres, to which the root user changes by typing su - postgres

From su man page: "su is mostly designed for unprivileged users, the recommended solution for privileged users (e.g., scripts executed by root) is to use non-set-user-ID command runuser(1) that does not require authentication and provides separate PAM configuration. If the PAM session is not required at all then the recommended solution is to use command setpriv(1)."

Re:Don't abuse su for dropping user privileges (2015) by erik_seaberg on Friday May 26, 2023 @10:31PM (#36091527)
Why does PAM have sessions? I thought it was a layer of indirection over whether you’re using a password file or NIS or LDAP to verify passwords.
Re:Don't abuse su for dropping user privileges (2015) by yrro on Sunday May 28, 2023 @10:02AM (#36104063)
PAM provides authentication, authorization, session management and password changing.