I have joined the debian9 machine to microsoft AD when i run su - test1 it create the home directory but with below permission.

root@debiantest:/home# ls -ltr
drwxr-xr-x  2 test1 data 4096 Sep 18 22:47 test1

added the umask=0077 in below files but still it create the file home dir with drwxr-xr-x permission

root@debiantest:/home# grep "umask" /etc/pam.d/*
/etc/pam.d/common-password:session required pam_oddjob_mkhomedir.so umask=0077
/etc/pam.d/common-session:session required pam_oddjob_mkhomedir.so umask=0077
/etc/pam.d/login:session required pam_mkhomedir.so skel=/etc/skel/ umask=0077

how do i make it to create user's home directory with 700 permission?


added chmod 700 /home/$(whoami) >> /dev/null 2>&1 in /etc/profile

  • Have you checked the permissions on /etc/skel? mkhomedir will copy what is there (within the bounds set by umask) – symcbean Sep 19 at 15:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.