I inserted these directives template shell = /bin/bash and template homedir = /home/%U the in smb.conf. What command do you use to create the user with the relative home directory and shell? -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 488 bytes Desc: OpenPGP digital signature URL: <http://lists.samba.org/pipermail/samba/attachments/20190408/0fbcda5c/signature.sig>
Hai Marco, Quickest way: By adding one line “session optional pam_mkhomedir.so” to: /etc/pam.d/common-session Edit /etc/pam.d/common-session, and add this line directly after session required pam_unix.so: session required pam_mkhomedir.so skel=/etc/skel/ umask=0022 And the way i would do this is : Create/edit : /usr/share/pam-configs/my_mkhomedir Add: Name: Activate mkhomedir Default: yes Priority: 900 Session-Type: Additional Session: required pam_mkhomedir.so umask=0022 skel=/etc/skel Save, now run : pam-auth-update and enable : Activate mkhomedir. The priority level make sure its placed before any ldap or kerberos setting. Greetz, Louis> -----Oorspronkelijk bericht----- > Van: samba [mailto:samba-bounces at lists.samba.org] Namens > marco via samba > Verzonden: maandag 8 april 2019 11:08 > Aan: samba at lists.samba.org > Onderwerp: [Samba] home user > > I inserted these directives template shell = /bin/bash and template > homedir = /home/%U the in smb.conf. What command do you use to create > the user with the relative home directory and shell? > > > -- > To unsubscribe from this list go to the following URL and read the > instructions: https://lists.samba.org/mailman/options/samba >
For got to mention. Other option, add in smb.conf : root preexec = mkdir -p /home/%U [homes] comment = Home Direcotries path = /home/%U root preexec = /var/lib/samba/scripts/mksambahomedirs.sh %U mksambahomedirs.sh --- #!/bin/env bash if [ ! -d /home/$1 ]; then mkdir /home/$1 chmod g+s /home/$1 chown $1:"domain admins" /home/$1 chmod 770 /home/$1 /usr/bin/setfacl -m g:"domain admins":rwx /home/$1 /usr/bin/setfacl -m u:"$1":rwx /home/$1 fi exit 0 Greetz, Louis> -----Oorspronkelijk bericht----- > Van: samba [mailto:samba-bounces at lists.samba.org] Namens > L.P.H. van Belle via samba > Verzonden: maandag 8 april 2019 11:26 > Aan: samba at lists.samba.org > Onderwerp: Re: [Samba] home user > > Hai Marco, > > Quickest way: > By adding one line “session optional pam_mkhomedir.so” to: > /etc/pam.d/common-session > Edit /etc/pam.d/common-session, and add this line directly > after session required pam_unix.so: > session required pam_mkhomedir.so skel=/etc/skel/ umask=0022 > > > And the way i would do this is : > Create/edit : /usr/share/pam-configs/my_mkhomedir > Add: > Name: Activate mkhomedir > Default: yes > Priority: 900 > Session-Type: Additional > Session: > required pam_mkhomedir.so > umask=0022 skel=/etc/skel > > Save, now run : pam-auth-update and enable : Activate mkhomedir. > > The priority level make sure its placed before any ldap or > kerberos setting. > > > Greetz, > > Louis > > > > -----Oorspronkelijk bericht----- > > Van: samba [mailto:samba-bounces at lists.samba.org] Namens > > marco via samba > > Verzonden: maandag 8 april 2019 11:08 > > Aan: samba at lists.samba.org > > Onderwerp: [Samba] home user > > > > I inserted these directives template shell = /bin/bash and template > > homedir = /home/%U the in smb.conf. What command do you use > to create > > the user with the relative home directory and shell? > > > > > > -- > > To unsubscribe from this list go to the following URL and read the > > instructions: https://lists.samba.org/mailman/options/samba > > > > > -- > To unsubscribe from this list go to the following URL and read the > instructions: https://lists.samba.org/mailman/options/samba > >
Thanks a lot Il 08/04/2019 11:40, L.P.H. van Belle via samba ha scritto:> For got to mention. > > Other option, add in smb.conf : > root preexec = mkdir -p /home/%U > > [homes] > comment = Home Direcotries > path = /home/%U > root preexec = /var/lib/samba/scripts/mksambahomedirs.sh %U > > > mksambahomedirs.sh > --- > #!/bin/env bash > > if [ ! -d /home/$1 ]; then > mkdir /home/$1 > chmod g+s /home/$1 > chown $1:"domain admins" /home/$1 > chmod 770 /home/$1 > /usr/bin/setfacl -m g:"domain admins":rwx /home/$1 > /usr/bin/setfacl -m u:"$1":rwx /home/$1 > fi > exit 0 > > > > Greetz, > > Louis > > > >> -----Oorspronkelijk bericht----- >> Van: samba [mailto:samba-bounces at lists.samba.org] Namens >> L.P.H. van Belle via samba >> Verzonden: maandag 8 april 2019 11:26 >> Aan: samba at lists.samba.org >> Onderwerp: Re: [Samba] home user >> >> Hai Marco, >> >> Quickest way: >> By adding one line “session optional pam_mkhomedir.so” to: >> /etc/pam.d/common-session >> Edit /etc/pam.d/common-session, and add this line directly >> after session required pam_unix.so: >> session required pam_mkhomedir.so skel=/etc/skel/ umask=0022 >> >> >> And the way i would do this is : >> Create/edit : /usr/share/pam-configs/my_mkhomedir >> Add: >> Name: Activate mkhomedir >> Default: yes >> Priority: 900 >> Session-Type: Additional >> Session: >> required pam_mkhomedir.so >> umask=0022 skel=/etc/skel >> >> Save, now run : pam-auth-update and enable : Activate mkhomedir. >> >> The priority level make sure its placed before any ldap or >> kerberos setting. >> >> >> Greetz, >> >> Louis >> >> >>> -----Oorspronkelijk bericht----- >>> Van: samba [mailto:samba-bounces at lists.samba.org] Namens >>> marco via samba >>> Verzonden: maandag 8 april 2019 11:08 >>> Aan: samba at lists.samba.org >>> Onderwerp: [Samba] home user >>> >>> I inserted these directives template shell = /bin/bash and template >>> homedir = /home/%U the in smb.conf. What command do you use >> to create >>> the user with the relative home directory and shell? >>> >>> >>> -- >>> To unsubscribe from this list go to the following URL and read the >>> instructions: https://lists.samba.org/mailman/options/samba >>> >> >> -- >> To unsubscribe from this list go to the following URL and read the >> instructions: https://lists.samba.org/mailman/options/samba >> >> >-------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 488 bytes Desc: OpenPGP digital signature URL: <http://lists.samba.org/pipermail/samba/attachments/20190408/58532048/signature.sig>