Customize PAM configuration

2019-08-09 Thread Jone
Hello! I want enter user/root password only once per session. To do this, it will probably be convenient to export the password to shell variable. For example, adding this to PAM configuration file: auth sufficient pam_exec.so expose_authtok /path/to/script.sh But how to write it in system-con

Re: Customize PAM configuration

2019-08-10 Thread Timothy Sample
Hi Jone, Jone writes: > Hello! I want enter user/root password only once per session. To do this, > it will probably be convenient to export the password to shell variable. > For example, adding this to PAM configuration file: > >auth sufficient pam_exec.so expose_authtok /path/to/script.sh

Re: Customize PAM configuration

2019-08-10 Thread Jone
Thanks, Timothy! And sorry for my bad english. > I don’t fully understand what you are trying to do It's elementary! One password for any "local services", such as sudo, GPG encryption, etc. The password is entered once at login and exported to environment variable. As a result, password is avail

Re: Customize PAM configuration

2019-08-10 Thread Ricardo Wurmus
Jone writes: > The password is entered once at login and exported > to environment variable. As a result, password is available during the user > session (for some automation with bash scripts). Please know that environment variables are readable in /proc and in the output of process managers.

Re: Customize PAM configuration

2019-08-10 Thread Jone
Important notice, thank you! I have read the detailed answer on this page: https://stackoverflow.com/questions/4129631/linux-securing-environment-variables and suppose I could use file instead variable. An alternative solution would probably be to configure sudoers file. But here comes the problem