automating creation of home dirs

Brad Tarver btarver at vention.com
Thu Oct 26 23:14:13 GMT 2000


okay,

here is my add_user script:
#!/bin/sh
useradd -m -k /etc/skel $1
chown -R $1:$1 /home/$1
chmod -R 0750 /home/$1 &
exit 0

here is my del_user script:
#!/bin/sh
userdel $1
echo "samba user '$1' removed" > /dev/console
echo "userdir '/home/$1' still intact" > /dev/console
exit 0

here is my three lines in smb.conf that reference add_user and del_user:
[global]
 security = domain
 add user script = /usr/local/samba/bin/add_user %u
 delete user script = /usr/local/samba/bin/del_user %u

and when i go to usrmgr on the PDC and add a user, nothing happens on the
linux box...

help! please!
Brad




-----Original Message-----
From: SRuth at LANDAM.com [mailto:SRuth at LANDAM.com]
Sent: Thursday, October 26, 2000 3:33 PM
To: btarver at vention.com; samba-ntdom at lists.samba.org
Subject: RE: automating creation of home dirs


Here ya go.

some of the script may not apply to your situation.

Sven


-----Original Message-----
From: Brad Tarver [mailto:btarver at vention.com]
Sent: Thursday, October 26, 2000 2:29 PM
To: 'SRuth at LANDAM.com'; Brad Tarver; samba-ntdom at lists.samba.org
Subject: RE: automating creation of home dirs


do you have a sample script you can send me?

-----Original Message-----
From: SRuth at LANDAM.com [mailto:SRuth at LANDAM.com]
Sent: Thursday, October 26, 2000 1:43 PM
To: btarver at vention.com; samba-ntdom at lists.samba.org
Subject: RE: automating creation of home dirs


use the "add user script" function in smb.conf

If you need more help or a sample script let me know.

Sven

-----Original Message-----
From: Brad Tarver [mailto:btarver at vention.com]
Sent: Thursday, October 26, 2000 1:13 PM
To: 'samba-ntdom at lists.samba.org'
Subject: automating creation of home dirs


i have a linux box with samba 2.0.7. my PDC is an NT4 box.

i want to be able to add a user thru user manager for domains on the NT PDC
and it create the user and the users home dir on the linux box...

is this possible? and if so could someone give me some kind of configuration
example on how to setup that up?

Brad

--
Brad Tarver
Network Engineer
btarver at vention.com
Vention, Inc.

"Security is not a product, but a process."
  -- Bruce Schneier, author of "Applied Cryptography".





More information about the samba-ntdom mailing list