| Author |
Message |
Mahmoud
Cat Chaser


Joined: 24 Nov 2003 Posts: 896
Location: AE, Shj
|
Posted:
Fri Dec 24, 2004 12:57 pm Post subject: QUESTOIN: on-fly machine trust accounts creation |
|
hi all
with samba, we need to create machine trust accounts in order to let machines join our domain.
there are two ways as discribed here:-
one is by doing it manually (leave it for now)
another one is by doing it automatically or on-fly account creation.
the example on samba's official site regarding automated account creation was just for RedHat Linux. but iam using FreeBSD now.
samba.org wrote:Here is an example for a Red Hat Linux system.
[global]
# <...remainder of parameters...>
add machine script = /usr/sbin/useradd -d /dev/null -g 100 \
-s /bin/false -M %u
the question is:-
what about FreeBSD's script? |
_________________
|
|
|
|
|
creed
Veteran Dog


Joined: 08 Nov 2003 Age: 97 Posts: 6337
Location: Exiled
|
Posted:
Fri Dec 24, 2004 2:15 pm Post subject: |
|
while i'm not a UNIX expert, have you tried just plugging in this code and seeing what happens? |
_________________
The Seven faces of Creed
     
|
|
|
|
|
soup4you2
Tail-Wagger


Joined: 15 Mar 2002 Posts: 2453
Location: Desolate wastelands of Virginia
|
Posted:
Tue Dec 28, 2004 4:19 pm Post subject: |
|
creed wrote:while i'm not a UNIX expert, have you tried just plugging in this code and seeing what happens?
hmm...
adduser does not like it when you try assigning a user $user the $ represents a trust account.. typically you need to vipw..
your best option would probbibly be a small perl script to take in $arg1 (machine trust) and create the account and groups needed.. by echo'ing the values into the master.passwd and re-creating the hash.. |
_________________ tomorrow will be canceled due to lack of interest
|
|
|
|
|
Mahmoud
Cat Chaser


Joined: 24 Nov 2003 Posts: 896
Location: AE, Shj
|
Posted:
Fri Dec 31, 2004 2:20 am Post subject: |
|
where to put that script?
i am not sure, but here is what i am gussing:-
i'll create that script and put it some where on the server. lets say /usr/local/samba/scripts/machine.perl
and in smb.conf file i type this:-
add machine script = /usr/local/samba/scripts/machine.perl $machine=%m
and it will send the machine netbios name to $machine variable in the perl script. after getting all variables needed to start the process. perl script makes it job.
to it will add an entry in /etc/passwd like this:
pc_nebios_name$:*:1003:1002:User &:/dev/null:/usr/sbin/nologin
and it does not need to add any thing to /etc/group because i created that group manually.
the unix part done, but what about adding records to smbpasswd and secrets.tdb?
also as i read, smbpasswd is the old one, and secrets.tdb is the newer one which allows adding bigger number of users than smbpasswd. are these files syncornized? because some times i remove samba accounts manually by just editing smbpasswd, but what about secrets.tdb? will it be edited automatically?
any idea of how that script should be?
waiting for answers.. |
_________________
|
|
|
|
|
|
|