Manage default home directory permissions with adduser vs. useradd
Niki Kovacs
info at microlinux.fr
Mon Jun 16 13:40:04 UTC 2014
Hi,
I want to set home directory permissions for newly created users to
0750. Instead of having to manually chmod 0750, I found out I could edit
this behaviour in /etc/adduser.conf:
DIR_MODE=0750
Now here's a more tricky question. I have to create a series of users
without shell access. What I'd usually do is something like this:
# useradd -m -g users -s /bin/false -c "Fantasio" fantasio
# useradd -m -g users -s /bin/false -c "Gaston Lagaffe" glagaffe
# useradd -m -g users -s /bin/false -c "Gaston Lagaffe" glagaffe2
# useradd -m -g users -s /bin/false -c "Jeanne Dupont" jdupont
# useradd -m -g users -s /bin/false -c "Bertrand Labévue" blabevue
Unfortunately my DIR_MODE=0750 directive is not operative, and these
users' home directories get created with default 0755 permissions.
Any idea if there's a secret trick or switch so they're directly created
with 0750 permissions?
Cheers,
Niki
--
Microlinux - Solutions informatiques 100% Linux et logiciels libres
7, place de l'église - 30730 Montpezat
Web : http://www.microlinux.fr
Mail : info at microlinux.fr
Tél. : 04 66 63 10 32
More information about the ubuntu-users
mailing list