[Samba] add machine script
jelmer at nl.linux.org
Thu Apr 17 14:38:44 GMT 2003
-----BEGIN PGP SIGNED MESSAGE-----
On Thursday 17 April 2003 15:02, Michel Gallant wrote:
> I'm using samba 3.0 alpha 23 on debian woody using a tdb backend. I've
> written a simple add machine script that takes care of the useradd and
> pdbedit -a -m steps. When I try to add a machine to the domain directly
> from that machine, without creating the accounts beforehand, I get an
> "Access Denied" error. After getting this error, I check on the samba
> machine and see that the account has been created in both /etc/passwd and
> my passwd.tdb file. If I try to join the machine to the domain again right
> away, it's successfull. Do I have to return something from my script?
> Here's the simple batch file I'm using:
> /usr/sbin/useradd -d /dev/null -g 2001 -s /bin/false $1
> /usr/bin/pdbedit -a -m $1
> /usr/bin/pdbedit -f 'Machine Account' -h '' -D '' $1
Your script is not supposed to create the samba account, only the unix one.
Samba does the pdbedit stuff internally.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
-----END PGP SIGNATURE-----
More information about the samba