Live Chat Software by Kayako
Knowledgebase: Ubuntu
Cách bước cấu hình cho phép Ubuntu 15.x Join domain với AD server
Posted by Thang Le Toan on 31 May 2015 04:49 AM

A. Download and install PBIS Open on Ubuntu 15.04

Open Terminal and use this command to download and install latest stable version of PBIS Open

cd ~/Downloads
wget http://download.beyondtrust.com/PBISO/8.2.2/linux.deb.x64/pbis-open-8.2.2.2993.linux.x86_64.deb.sh

or

cd ~/Downloads
wget http://download.beyondtrust.com/PBISO/8.2.2/linux.deb.i386/pbis-open-8.2.2.2993.linux.x86.deb.sh

 

Now install the package

For 64 bit system

cd ~/Downloads
chmod +x pbis-open-8.2.2.2993.linux.x86_64.deb.sh
sudo ./pbis-open-8.2.2.2993.linux.x86_64.deb.sh

For 32 bit system

cd ~/Downloads
chmod +x pbis-open-8.2.2.2993.linux.x86.deb.sh
sudo ./pbis-open-8.2.2.2993.linux.x86.deb.sh

 

At this point, PBIS Open is installed. But to get better result, we still need to configure few things.

Install ssh

sudo apt-get install ssh

 

B. Join Ubuntu 15.04 to Windows Domain

Still on terminal, execute this command to start joining Ubuntu 15.04 to existing Windows Domain

sudo /etc/init.d/lwsmd restart

(neu loi chung ta se phai thuc hien tao lwsmd service):

cd /opt/pbis/bin
sudo domainjoin-cli join fastest.local administrator

or

sudo domainjoin-cli query

Output

dhani@vervet:/opt/pbis/bin$ sudo domainjoin-cli join fastest.local administrator
[sudo] password for dhani:
Joining to AD Domain: gamblisfx.co.id
With Computer DNS Name: vervet.gamblisfx.co.id

administrator@GAMBLISFX.CO.ID’s password:
SUCCESS

 

join ubuntu to windows domain

 

Change gamblisfx.co.id and administrator with your own Domain Controller credentials. Make sure it returned SUCCESS at the end of the result.

 

On my first trial, I got error on the lwsmd service. But there is a smart solution here. Create lwsmd service manually

 

sudo nano /lib/systemd/system/lwsmd.service

 

Add the following lines to the lwsmd.service file

 

[Unit]
Description=BeyondTrust PBIS Service Manager
After=network.target

[Service]
Type=forking
EnvironmentFile=/opt/pbis/libexec/init-base.sh
ExecStart=/opt/pbis/sbin/lwsmd –start-as-daemon
ExecReload=/opt/pbis/bin/lwsm refresh
ExecStop=/opt/pbis/bin/lwsm shutdown
# We want systemd to give lwsmd some time to finish gracefully, but still want
# it to kill lwsmd after TimeoutStopSec if something went wrong during the
# graceful stop. Normally, Systemd sends SIGTERM signal right after the
# ExecStop, which would kill lwsmd. We are sending useless SIGCONT here to give
# lwsmd time to finish.
KillSignal=SIGCONT
PrivateTmp=true

[Install]
WantedBy=multi-user.target nss-lookup.target

 

Now create symlinks

 

cd /etc/systemd/system
sudo ln -s /lib/systemd/system/lwsmd.service
sudo systemctl enable lwsmd.service

 

Now start lwsmd

 

sudo service lwsmd start

 

 

 

C. Edit lightdm configuration file

 

We need to edit the lightdm configuration file so we can login with other user (Domain users)

 

sudo nano /usr/share/lightdm/lightdm.conf.d/50-unity-greeter.conf

allow-guest=false
greeter-show-manual-login=true

 

Now reboot your Ubuntu and login with Domain Users.

 

join ubuntu to windows domain 2

 

 

 

wget http://archive.ubuntu.com/ubuntu/pool/universe/l/likewise-open/likewise-open-gui_6.1.0.406-0ubuntu5.1_amd64.deb

 

wget http://archive.ubuntu.com/ubuntu/pool/main/libg/libglade2/libglade2-0_2.6.4-2_amd64.deb

 

wget http://archive.ubuntu.com/ubuntu/pool/main/l/likewise-open/likewise-open_6.1.0.406-0ubuntu5.1_amd64.deb

 

sudo dpkg -i likewise-open_6.1.0.406-0ubuntu5.1_amd64.deb

sudo dpkg -i libglade2-0_2.6.4-2_amd64.deb

sudo dpkg -i likewise-open-gui_6.1.0.406-0ubuntu5.1_amd64.deb

 

http://bjtechnews.org/2014/09/03/joining-ubuntu-to-windows-active-directory-notes/

 

http://www.krutant.com/how-to-use-ubuntu-at-workplace-by-joining-an-active-directory-domain/

 

    1. Launch Terminal and type the following command:

sudo visudo

    1. Use the arrow keys to navigate down to the “#User privilege specification” section, it should look like this:

# User privilege specification
root ALL=(ALL) ALL
%admin ALL=(ALL) ALL

    1. Put the cursor on the next empty line below the %admin entry and then press the “A” key to insert text, then type the following on a new line, replacing ‘username’ with the users short name of the account you wish to grant privilege to (hit tab between username and ALL):

username ALL=(ALL) ALL

  1. Now hit the “ESC” (escape) key to stop editing the file
  2. Hit the : key (colon) and then type “wq” followed by the Return key to save changes and exit vi

This is roughly what it should look like, the example screen shot shows username ‘osxdaily’ added:

 

Tim hieu them o link: http://ubuntuforums.org/showthread.php?t=1132821 

$ sudo usermod -a -G sudo AD_administrative_user

 

 

(0 vote(s))
Helpful
Not helpful

Comments (0)
Post a new comment
 
 
Full Name:
Email:
Comments:
CAPTCHA Verification 
 
Please enter the text you see in the image into the textbox below (we use this to prevent automated submissions).

Help Desk Software by Kayako