PDC

From Amahi Wiki
Jump to: navigation, search

Please read this carefully

Since we are getting many users with problems using "wrong" versions, please be aware of:

  • windows, only Pro versions (win2k pro, xp pro, Vista business) support domain features, home versions do not.
  • mac osx does support joining a windows network
  • Linux supports samba shares
  • Windows 7 needs tweaking, please create a registry file (Win7SambaDomainMember.reg with the following contents:


Windows Registry Editor Version 5.00

Text
​[HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanManWorkstation\Parameters] "DNSNameResolutionRequired"=dword:00000000 "DomainCompatibilityMode"=dword:00000001 [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Netlogon\Parameters] "Update"="no" "DisablePasswordChange"=dword:00000000 "MaximumPasswordAge"=dword:0000001e "RequireSignOrSeal"=dword:00000001 "RequireStrongKey"=dword:00000001 "SealSecureChannel"=dword:00000001 "SignSecureChannel"=dword:00000001​
  • Save the file, and double-click it, so that it gets entered into the registry. (windows will warn you that it might be unsafe to add things to the registry, just click yes, and a message should apear that the keys have been entered into the registry)
  • Windows 7 issues:
    • There is a warning kicked up that can be ignored. it complains about DNS not beeing set correctly. reboot and you are there
    • as of 06/02/2010 roaming profiles work under windows 7

Making Amahi a PDC - Primary Domain Controller

First you need to enable PDC options for the amahi server. to do this go to your dashboard, then select Setup, then Settings, then tick the box that says Advanched Features After you've done this go to Shares then Settings now you'll see the option called PDC enable it for Amahi to act as a windows PDC Server.


  • To join a machine to the domain, it has to be done by logging in once as root. Unfortunately, Amahi does not currently create a root samba user. For now and until we enable granting admin rights to other users, do this (set the samba password for the root user):
bash code
​smbpasswd -a root smbpasswd -e root service smb restart service nmb restart​


  • Then join the domain: Select start, control panel, system, and click computername. Then select network-id and follow the wizard. (Domain name default is 'home' but can be changed in your HDA dashboard, under Setup > Shares > Settings then click on the domain name and change it to what you want.) When it asks you for a username/password, supply the root username/password you created above. This only needs to be done once

Full procedure for Windows XP

Thanks to obnox for explaining all this to robbiet480 who got his PDC working with the same directions

  1. On the Windows Box
    1. Go to network connections
    2. Double click your main network connection
    3. Open the TCP/IP properties window
    4. Click advanced
    5. go to the WINS tab
    6. Add your Amahi IP to the list
    7. force enable NetBIOS Name,
  2. On the Amahi box
    1. Open a terminal
      1. smbpasswd -a root (set the samba password for the root user. You need to remember this for later!)
      2. smbpasswd -e root
      3. service smb restart
      4. service nmb restart
  3. Back to windows!
    1. Open the System window by right clicking on My Computer in the Start Menu
    2. Go to the "Computer Name" tab
    3. Click Change
    4. Type in the domain IN ALL CAPS (default is 'home' but can be changed in your HDA dashboard, under Setup > Shares > Settings then click on the domain name ) and finish by binding the windows client using the root credentials you setup above. Restart the computer
    5. login w/ your user or root from the Windows login screen.
    6. you are done!

How to Join a Domain with a Non-root User

Old Development Notes

WARNING: These settings apply to the beta test only!! Other users see the old directives

Browse to your HDA dashboard. Select setup, then shares, then settings, then check PDC. now your new smb.conf is beeing generated! create the following file:

bash code
​nano /var/hda/domain-settings/netlogon/logon.bat​

and add the following to it:

Text
​;Sync Windows clock with Samba clock net time /set /yes ;Mount a samba share into x: net use u: \\hda\BACKUP /persistent:no net use v: \\hda\AFBEELDINGEN /persistent:no net use w: \\hda\DOCUMENTEN /persistent:no net use x: \\hda\SOFTWARE /persistent:no net use y: \\hda\VIDEOS /persistent:no net use z: \\hda\MUZIEK /persistent:no​

save the file. next go to the workstation that you want to add to the domain. Select start, control panel, system, and click computername. then select network-id and follow the wizard. when it asks you for a username/password, supply the root username/password you created on the PDC. This is needed because Windows will otherwise be unable to join the Domain. once windows welcomes you to the new domain, you can restart your computer, and login with any user you created through the hda tab!



Old Directions

Open a terminal on your hda, or, if you use putty, open a connection to your hda.
Login as root:

bash code
​su -​

First, backup your smb.conf file, in case you run into problems you can easily revert back.

bash code
​cp /etc/samba/smb.conf /etc/samba/smb_old.conf​

next we need to modify the smb file, i use nano for this, you may use any editor you feel confortable with

bash code
​nano /etc/samba/smb.conf​

change the apropriate parts in the smb.conf.
Save your smb.conf

So at this point we need to create the corresponding directories:

bash code
​mkdir /var/hda/domain-settings mkdir /var/hda/domain-settings/netlogon mkdir /var/hda/domain-settings/profiles​


Each time you want a user to join the domain, a user needs to be added, this can be done through the users tab on the amahi dashboard.
aditionally, a profile directory needs to be created.

bash code
​mkdir /var/hda/domain-settings/profiles/JanJacobs​

JanJacobs is the user i created through the users tab of the amahi dashboard.
Since we are logging in as root, we need to change the ownership of the previously created directory to the corresponding owner:

bash code
​chown -R JanJacobs /var/hda/domain-settings/profiles/JanJacobs​

Now, this still doesnt allow us to login, because in samba, machines need to be added too!
this can be done automaticly, but for the time beeing we do it manually, amahi may facilitate this for you in the future.

bash code
​useradd -s /bin/false -d /dev/null computername$ smbpasswd -a -m computername​

Now as you can see there are some differences, when we added the Windows pc to Linux, we added the name computername$, this tells Linux that it is a machine, not a name.
Next when we added the Samba password, we invoked the -m, this again tells Samba that we are adding a pc, not a person.
Also, you probably noticed that it did not prompt for a password, it just added computername$.
When you logon to the domain, Samba will read the password from your Windows password.
Now that this done, all what is left to do is restart Samba, this also has to be done for each computer you intend to login with.
no we dont add the $ sign, since all we do is adding an existing linux user to the samba password file.
we tell samba its a machine simply by adding the -m switch to the command.
At this point i have network logins working, using roaming profiles.

now its time to restart samba.

bash code
​/etc/init.d/smb restart​


Now you need to setup your Windows pc for domain logins.
(Note the first time that you join a Samba domain from Windows, you will need to join the domain by using root as the name, and your root password for the password.
After rebooting, any valid user will be able to access the domain.)