Sunday, April 17, 2011

HOW TO MAKE SAMBA AS DOMAIN CONTROLLER AND CREATE LOGON SCRIPT FOR CLIENT

1- you have to make client able to ping the netbios name and server name
two option --> edit hosts file and imhost file on server
       --> edit hosts file and imhost file on server

2- edit file /etc/samba/smb.conf to 

[global]
        netbios name = linux
        workgroup = linux.com
        security = user
        logon script = %U.bat
        domain master = Yes
        os level = 65
        local master = Yes
        preferred master = Yes
        domain logons = Yes
        add machine script = /usr/sbin/useradd -c Machine -d /var/lib/nobody -s /bin/false %m$

3- restart service smb and nmb

****note-- you can see error message on "tail -f /var/log/message" for more info
****nmb is the name service of samba.

------------------------------------------
HOW CREATE LOGON SCRIPT FOR CLIENT

1- add the folling lines to /etc/samba/smb.con

[netlogon]
        comment = The domain logon service
        path = /export/samba/logon
        public = no
        writeable = no
        browsable = no

2- create the folder the same as path (/export/samba/logon)

3- create script in the folder and maned with username.bat

EX, if i want to map drive for user jonh
1- creat a file with the mane jonh.bat content below store in /export/samba/logon
net use H: \\server\share

============================================

No comments:

Post a Comment