Skip to content
PierreGode edited this page May 20, 2018 · 28 revisions

Welcome to the Linux-Active-Directory-join-script wiki!

On AD: Prepare with creating a group object in AD matching the hostname of the client or server. Example: DNSserver01 and in the Group DNSserver01 add users or use existing group with users.

On Client:

  1. Download script using git clone.
  2. cd Linux-Active-Directory-join-script
  3. sudo sh Linux-Active-Directory-join-script
  4. for client setup press 1 for server setup press 2
  5. Script will start installing packages and verify success.
  6. Script will search the network for a realm and suggest to use it or promt for it.(If script fail to find your domain you can try to type it in.)
  7. Script will determine if Ubuntu 14, 16, 17, 18, raspbian, ubuntu mate, centOS or Debian is the OS and prepare for setup.
  8. Admin will be prompted to enter admin user. type in your Active directory admin user without domain Example:Pierreadmin
  9. Admin will be prompted to enter password
  10. Script will ask if you want ssh security ( will block all other local and domian users except for allowed group "DNSserver01" and local administrator, by disabeling ssh login security, all users in the domain will be able to log in but only groups i sudoers will have sudo.
  11. Script will ask for sudo permissions, on yes it will give domaingroup "DNSserver01" and local administrator sudo write.
  12. Script will promt if success and check for errors.
  13. reboot and then login with AD user Example ADadmin and password.

Folders will be crated for each user that logs in and the format is /home/netbios.domain/user user will show as Example: pierre . all / and @ is removed from user and folder.

On yes to ssh allow the script will create ssh login.group.allowed where it puts administrator, domain admins and grupobject (DNSserver01 in example) all other users are not allowed to ssh or login to the client NOTE ALL other users will be banned, even local.

If script fails at start with error message : Installing pakages failed.. please check connection and dpkg and try again. then try to reboot and verify the ethernet has connection and try running the script again or verify dpkg first with sudo apt-get update.

At the end of the script it will print out what it has written to sudoers and ssh-allow verify those are correct before restarting.

Clone this wiki locally