[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[K12OSN] how do you force lowercase homes for users authenticating via winbind?



Hello all,

I hope this is an easy one. I am using samba and winbind to allow
Windows users to login to my LTSP box. Samba will automagically create
a home directory for them if they don't already have one.

The problem is a user who logs in as 'user' or 'USER' or 'UsEr' all
get a home created for them the first time they log in with whatever
permutation of their username there fingers fall on. Doing id 'user',
'USER' and 'UsEr' shows me that each of these logins share the same
UID. To combat this, I want to force all user directories to be
created lowercase despite whatever the students type. Since I use
Gnome I tried adding this line to /etc/gdm/PostLogin/Default:

u=`echo $USER | tr A-Z a-z`

but it didn't help. I think that samba uses this line in
/etc/pam.d/common-session to create the home directory on the fly:

session required        pam_mkhomedir.so umask=0022 skel=/etc/skel


but it doesn't look like I can pass arbritary options (like 'tr A-Z a-z` )

Am I being dumb?  Is there an easy switch in smb.conf ?


I hope someone can help!

Thanks,

John

Here's my smb.conf:

[global]
       security = ads
       realm = my.domain.ORG
       password server = 10.114.5.50
       workgroup = STUDENTS
#       winbind separator = +
       idmap uid = 10000-20000
       idmap gid = 10000-20000
       winbind enum users = yes
       winbind enum groups = yes
       template homedir = /home/%D/%U
       default case = lower
       #template homedir = /home/McM/%U
       template shell = /bin/bash
       client use spnego = yes
       client ntlmv2 auth = yes
       encrypt passwords = true
       winbind use default domain = yes
       restrict anonymous = 2


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]