[SATLUG] create home directory for an ldap user

rabie at rabie.net rabie at rabie.net
Thu Mar 1 11:16:17 CST 2012


  

FYI, 

Here is what I did : Edit the /etc/smb.conf with the
following change : 

template shell = /bin/bash
template homedir
=/home/%U

service restart winbind ( if you use samba restart samba
deamon or just service samba restart)
Append the following line to
/etc/pam.d/system-auth in order to create home directory after the first
login ( disable it later )

session required
/lib/security/pam_mkhomedir.so

Edit /etc/ssh/sshd_config

( Add the
following lines : AllowUsers user1 user2 user3 )

et voila

On
01.03.2012 07:35, Kernel Architect wrote:
> Well that was the second
option lol...not the smb.conf way but editing the
> PAM config...
> 
>
E
> 
> On Thu, Mar 1, 2012 at 8:30 AM, wrote:
> 
>>
>>
>> Thanks Kernel,
I read it last night, we don't use NFS for home
>> directory.
>>
>> I
guess I found the way to do it, by editing the smb.conf
>> file and add
the users I want to a group and that will generate
>> automatically a
home directory for that user after the first
>> login.
>>
>> Rabie
K
>>
>> On 01.03.2012 07:22, Kernel Architect wrote:
>> > This
>> should
help you out....
>> >
>> >
>>
http://www.redbooks.ibm.com/abstracts/tips0410.html
>> >
>> > E
>> >
>>
> On Thu,
>> Mar 1, 2012 at 8:09 AM, wrote:
>> >
>> >> Hello,
>> >>
>>
>> I m working on a
>> centos box where I have to create some linux
users with
>> >> their home
>> directory, but of course when I use
useradd it tells me that the
>> >> user
>> exists, of course it's an
ldap user, I tried to do usermod but the
>> >>
>> error that the user
doesn't exist in /etc/passwd so how can I convert
>> the
>> >> ldap user
to a unix/linux user where the user can have its own
>> home
>> >>
directory and shell ( basically an entry in /etc/passwd and
>>
/etc/shadow )
>> >>
>> >>
>> >> Thanks
>> >>
>> >> Rabie K
>> >>
>> >>
--
>> >>
>> ______________________________**_________________
>> >>
SATLUG mailing
>> list
>> >> SATLUG at satlug.org
>> >>
>>
http://alamo.satlug.org/**mailman/listinfo/satlugto
>>
manage/unsubscribe
>> >> Powered by Rackspace (www.rackspace.com)
>>
>>
>>
>>
>> --
>> _______________________________________________
>>
SATLUG mailing list
>> SATLUG at satlug.org
>>
http://alamo.satlug.org/mailman/listinfo/satlug to manage/unsubscribe
>>
Powered by Rackspace (www.rackspace.com)
>>

 


More information about the SATLUG mailing list