[Samba] FDS + samba + add machine account script

tom farrel tomfarrel8 at gmail.com
Mon Feb 4 09:23:40 GMT 2008


On Feb 4, 2008 1:11 PM, Sadique Puthen <sputhenp at redhat.com> 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.
>
> [root at dhcp6-232 ~]# 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

" 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
>



-- 
Regards
Tom :)
/*It's  too complicated, Lets make it simple*/


More information about the samba mailing list