|
|
...making Linux just a little more fun! Using Samba to join a Windows NT domainBy Rich Price
I originally wrote this procedure for use at my place of work. We have a number of Windows domains [NT style, not active directory] and I often need to have a Linux machine join one of them. This procedure was developed on a box running Fedora Core 1; however, with simple modifications (namely, stopping the Samba services manually by invoking the appropriate script in "/etc/init.d" with the "stop" option), this should also work for other distributions. Assumptions
Getting StartedUse the GUI "Services" tool [Which is Main Menu, System Settings, Server Settings, Services in Fedora] to shut down the samba daemons [smbd and nmbd] if they are running on the server. The smb.conf FileNext edit the /etc/samba/sbm.conf file and replace the [global] section with:
[global]
workgroup = {domain}
server string = {server name}
log file = /var/log/samba/%m.log
max log size = 50
security = domain
password server = [name of a PDC or BDC for {domain}]
encrypt passwords = yes
smb passwd file = /etc/samba/private/smbpasswd
local master = no
wins server = {wins server}
dns proxy = no
Where: At this point you can make any other changes or adds that you want to other sections of this file. The smbpasswd FileFor security reasons we will place the smbpasswd file in a private directory using the following commands: cd /etc/samba mkdir private cd private touch smbpasswd chmod 600 smbpasswd cd .. chmod 500 private Now we will add a dummy entry to the smbpasswd file. To do this, first create a user account for yourself on the Linux server [unless one already exists], then execute the following commands: cd /etc/samba/private cat /etc/passwd | mksmbpasswd.sh > smbpasswd Finally, edit the smbpasswd file and remove all lines except those for your user account. Joining the DomainTo add the Linux server to the domain use the following command:
net rpc join member -U {administrator}
Where {administrator} is the user id of a domain administrator for {domain}. You may be prompted for the administrator's password at this time. Cleaning UpUse the "Services" tool [Which is Main Menu, System Settings, Server Settings, Services in Fedora] to start the samba daemons. Then use the "Services" tool [Which is Main Menu, System Settings, Server Settings, Services in Fedora] to enable the Samba service for all of the appropriate run levels.
|
Rich Price has been using computers for around 35 years and Linux
for around 10 years. And he hasn't got tired of either quite yet.