Created
May 10, 2018 19:29
-
-
Save frayos/fba5f3753563e887581ce363c199cabb to your computer and use it in GitHub Desktop.
sasauth make home pam
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
#### | |
# Author Alexender Lysenko @ SAS | |
#### | |
##SAS doesn't have the functionality to create home directories for end-users, but you can do that on PAM level: | |
######## | |
# REQUIREMENTS : | |
##### | |
#Install oddjob-mkhomedir on the server | |
#Create a script /etc/pam.d/sasauth-mkhomedir.sh with the following contents: | |
################ | |
dbus-send --system --dest=com.redhat.oddjob_mkhomedir --print-reply / com.redhat.oddjob_mkhomedir.mkhomedirfor string:"$PAM_USER" | |
#Made that script executable: | |
#chmod +x /etc/pam.d/sasauth-mkhomedir.sh | |
#Add the line below to the end of the /etc/pam.d/sasauth file (at the end of the existing account section): | |
#account optional pam_exec.so /etc/pam.d/sasauth-mkhomedir.sh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment