WG: [Samba] Create user home directory or user-own folder on sambaserver on first login to samba

Daniel Müller mueller at tropenklinik.de
Tue Oct 21 11:26:40 GMT 2008


Hello

In the [homes] section at first with root preexec=/path/to/script
Ex:
[homes]
Root preexec=/scripts/./firstlogon

In the firstlogon this could be:
#!/bin/bash
#probe if $1=user exist and his home share
If test -d /users/$1
Then 
#write only to log file 
Echo "$1 User and Share exist" >> /somewhere/logfile
#if not exist make it
Else
Mkdir /users/$1
Chmod -R 700 /users/S1
Chown -R $1:"Domain Users" /users/$1
Echo "made /users/$1" >> /somewhere/logfile
Fi

This is my way suite it to your needs

Greetings
Daniel 


-----Ursprüngliche Nachricht-----
Von: samba-bounces+mueller=tropenklinik.de at lists.samba.org
[mailto:samba-bounces+mueller=tropenklinik.de at lists.samba.org] Im
Auftrag von Ðóñàêîâ Äåíèñ
Gesendet: Dienstag, 21. Oktober 2008 12:08
An: samba at lists.samba.org
Betreff: [Samba] Create user home directory or user-own folder on
sambaserver on first login to samba


Hello,
  I'd like to create user home directory or user-own folder on samba
server on first login to samba without using PAM, so how could I do
this?

Thank you,
Denis
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba



More information about the samba mailing list