Wednesday, March 19, 2014

How to Add a Linux Computer to a Windows Domain


Using Ubuntu Linux
1. Open a terminal prompt and type the following command to install the Likewise Open package:sudo apt-get install likewise-open
2. Type the following command to join the domain:sudo domainjoin-cli join mycompany.com myuseridReplace 'mycompany.com' with your domain name, and 'myuserid' with an administrator-level username. You will be prompted to enter your password; once successfully authenticated, the terminal will return a success message.The next steps will configure this domain as default when logging in and are optional; if they are not performed, you must specify a domain name when logging in.
3. Edit the lwiauthd.conf file using a plain text editor. For example, to edit with emacs, type the following:sudo emacs /etc/samba/lwiauthd.confAdd the following statement to the file and save it: winbind use default domain = yes
4. Type the following command to restart the Likewise Open daemons:sudo /etc/init.d/likewise-open restart
Using Fedora Linux
5. Open a terminal prompt and type the following command to edit the Samba configuration:sudo emacs /etc/samba/smb.confInstead of emacs, you can also use your preferred text editor.
6. Edit the smb.conf file to match the following lines, changing 'COMPANY.COM' to the name of your domain:[global]realm = COMPANY.COMsecurity = ADSencrypt passwords = yes
7. Save the file and type the following command to set the Kerberos authentication realm:sudo kinit myuser@COMPANY.COMReplace 'myuser@COMPANY.COM' with a valid username and your domain name.
8. Type the following command to join the Windows domain:net ads join -S windowsserver.company.com -U administrator%passwordReplace 'windowsserver' with a valid Active Directory server, 'company.com' with your domain name, 'administrator' with your username and 'password' with a valid password. The server is now a member of the domain.

No comments:

Post a Comment