We will setup 2 domains mydomain1 & mydomain2 on 1 linux machine with samba.
1. Create 2 samba config files in /etc/samba/
a. smb.conf_mydomain1
b. smb.conf_mydomain2
2. Your smb.conf_mydomain1 will look like below:
lock directory = /var/lib/samba/locks/server2
4. Then create below directories:
/var/lib/samba/locks/server1
/var/lib/samba/locks/server2
5. Start samba using below commands:
smbd -s /etc/samba/smb.con_mydomain1
nmbd -s /etc/samba/smb.con_mydomain1
smbd -s /etc/samba/smb.con_mydomain2
nmbd -s /etc/samba/smb.con_mydomain2
6. Check smb started or not.
ps -ef|grep smb
7. Add trust account (for NT machines only)
groupadd trust
useradd -g trust -d /dev/null -s /bin/false <machine name>$
passwd -l <machine name>$
====> NOTE: PLEASE DONT FORGET TO GIVE ‘$’ IN ABOVE 2 COMMANDS
smbpasswd -l <machine name>
If you want to add group of machines. Please download my script from sites.google.com/site/techbirdin/knowledge-base/addmachine.sh
8. Adding administrator account
smbpasswd -a root
(GIVE Samba Passwd for root)
9. FOR WIN XP PROF users NOT for WIN98 ot XP HOME
login to that windows machine (machine name) with administrator.
Right click to "My Computer" and click on "Properties"
Click on "Computer Name" Tab
Click on "Change"
Put Domain – "mydomain1" OR "mydomain2"
Click OK
It will ask for Domain admin username & passwd. Give username: root and smbpasswd of root
If everything is good then it will show you "Welcome to mydomain1 or 2"