tom farrel wrote:
On Feb 4, 2008 1:11 PM, Sadique Puthen <[EMAIL PROTECTED]> wrote:

satish patel wrote:
Dear all

               I have setup FDS for samba backend but i dont know how to
add machine account in FDS it is possible through script or manaualy...
Better you add it through scripts. The GUI interface for FDS is not so
sophisticated to add samba machines through simple clicks, you should
have to have a lot of clicks.

I use a simple script as below.  This is used against an openldap
server, but there is no reason for this not to work with FDS. Define a
base id at /etc/samba/machineid before you start the script.

[EMAIL PROTECTED] ~]# cat addmachine.sh
#!/bin/bash
uid=`cat /etc/samba/machineid`
nextuid=$(($uid + 1))
echo $nextuid  > /etc/samba/machineid
read -p " Please enter the machine name (If your windows system name is
dhcp6-120.pnq.redhat.com, please only enter dhcp6-120    : "  choice
/usr/bin/ldapmodify -a -x -H ldap://10.65.7.98 -D
cn=admin,dc=samba,dc=redhat,dc=com -w redsmb  << EOF
dn: uid=$choice\$,ou=Computers,dc=samba,dc=redhat,dc=com
uid: $choice\$
cn: $choice Account
objectClass: account
objectClass: posixAccount
objectClass: top
userPassword: {crypt}x
loginShell: /sbin/nologin
uidNumber: $uid
gidNumber: 2515
homeDirectory: /dev/null
EOF

Other choice is to use smbldap-tools scripts as you  may wish.


Hi

Is The above script is used to first add the computer the FDS and then go
the system  and add to the samba  domain.

Not sure if the above script can be mentioned in smb.conf

No, You have to slightly modify the script if you want it to be added to smb.conf. You need to remove the promtping and pass the $1 as the machine name.

--Sadique

" add machine script = /tmp/myscripts/addmachine.sh"

But if smbldap-tools are used then machine can be added in fly.

But there is alternative to smbldap-tools also ,

The recent http://fdstools.wiki.sourceforge.net/  which can be used to do
the following
http://fdstools.wiki.sourceforge.net/doc_fds_commands



--Sadique


$ cat ~/satish/url.txt

http://www.linuxbug.org

_____________________________________________________________________________________________________
---------------------------------
 Forgot the famous last words? Access your message archive online. Click
here.
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba





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

Reply via email to