Breaking News
Loading...
Jumat, 05 Oktober 2012

Authenticating Ubuntu via Active Directory with Samba/Winbind

14.42
Make sure your IP address is static on Ubuntu and not set for DHCP. If the address changes or you have a short lease, the IP address will change and so will /etc/resolv.conf which will render this procedure useless even during the setup.

● Open a root shell
 
● Install the following packages:
 
(May ask you for Kerberos server for your realm. Enter the IP of the Windows 2k8 server) 

● Stop samba services:

● Create new /etc/samba/smb.conf (make sure this reflects your domain and IP data – you can throw out any other data in this file):

● Check Samba configuration:

(look for warnings or errors)

● Create a new /etc/krb5.conf to configure the default realm and the Key Distribution Center server (make sure this reflects your domain and IP data):


● Go to System/Preferences/Network Connections, select Wired/Auto eth0 and double check the Ipv4 settings that it shows the W2k8 server ip address and the correct domain name for DNS Servers and Search domains. (You may need to stop and start the network to make the changes permanent.)

● Add to /etc/hosts (make sure this reflects your domain data):


● Make sure the Windows 2008 server and Ubuntu times are in sync (make sure this reflects your Windows 2008 server name):

(If you receive an error message, STOP! You need correct time to continue)

● Get a Kerberos ticket:


● Attempt to join Samba to Active Directory:


(If JOIN fails, STOP! Any error message means you cannot proceed.)

● Edit /etc/pam.d/common-session (add after pam_unix line):


● Edit /etc/nsswitch.conf:
Add a space and winbind to the end of the password and group lines.

● Start Samba services:


● Check users and groups are retrieved by winbind:


(If you don't see any output, that is very bad!)

● Check users and groups appear to system:


(If you can't see the Active Directory users and groups, that, too, is very bad!)

● Test ssh to local system (substitute a real AD user for username):


(Enter password of user from Active Directory. This can also be the administrator account and password) 

● Look for the home directory to be created (substitute a real AD user for username):


(Should show something like /home/SMKMUHI/username)
 

If you can login to Ubuntu via ssh with an Active Directory user, this portion is complete. 
Otherwise, stop. Nothing is going right and you need to fix what is broken.


Configuring Active Directory Users to Retrieve Roaming Profile from Samba


 
On the Windows 2008 server, start Server Manager.
Illustration 1: Server Manager window.














Illustration 2: Selecting a user from the Users folder.




Select the Users folder, then right click on a user and select Properties.









Illustration 3: Setting up the profile path and home folder.
Enter the Profile path as \\ubuntuserver\username\profile where ubuntuserver is the name of the Samba server and username is the name of the Windows user.

Select Connect and a drive letter (H:) and enter the To value as \\ubuntuserver\username

You will likely get a message about access to the server. You can simply select OK.

 Select OK.







● On Ubuntu, Edit /etc/samba/smb.conf and add the following new section:


● You will need to join Windows 7 to the domain controller like you did with Samba, but the procedure is slightly different.
  1. Go to Start/Control Panel/Systems and Security/System and select Change Settings. 
  2. From the Computer Name tab select Change. 
  3. Select the Domain radio button and enter ciss150.net for the domain. 
  4. Enter the administrator username and password when prompted. (If you are not prompted, then your network settings are incorrect. Namely, the DNS server is likely not pointing to the Windows 2008 server.) 
  5. If successful, you will receive, Welcome to the ciss150.net domain. 
  6. Reboot. 
● Log on to Windows 7 with a user in the Active Directory domain. If successful, that is, no errors, then logout. (You may have to do this twice.)

 ● On Ubuntu determine if the profile roamed by looking in the directory:
 

Hope you can help. Thanks

avatarPakirwan
Menerima Jasa Setting Mikrotik, Proxy, Networking, Hotspot Pembuatan dan Desain Website, PHP, CMS,CI dan HTML Murni, Visual Programming

0 comments:

Posting Komentar

 
Toggle Footer