[Samba] home user
L.P.H. van Belle
belle at bazuin.nl
Mon Apr 8 09:40:21 UTC 2019
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
>
>
More information about the samba
mailing list