diff --git a/CMakeLists.txt b/CMakeLists.txt index 0b67f75..95ca5da 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -14,7 +14,7 @@ install(FILES README.md DESTINATION /usr/share/doc/domain_join/ ) set(CPACK_PACKAGE_NAME "domain-join") set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "meta package that automates domain join for ubuntu systems") -set(CPACK_PACKAGE_VERSION "1.0.16") +set(CPACK_PACKAGE_VERSION "1.0.17") set(SYSTEM_ARCH "all") set(CPACK_DEBIAN_PACKAGE_DEPENDS "realmd,sssd,sssd-tools,samba-common,packagekit,samba-common-bin,samba-libs,adcli,cifs-utils,libpam-mount,libpam-ccreds,findutils,dialog,libpam-sss,coreutils,xmlstarlet,smbclient,pcregrep,keyutils") diff --git a/README.md b/README.md index 2f23882..a47dad7 100644 --- a/README.md +++ b/README.md @@ -14,9 +14,9 @@ # Why domain join? In a Enterprise environment it is state of the art to have a network that is managed by a domain controller. In Linux it can be a pain to join to a AD domain. In order to make it nearly as convenient as in windows to join the domain, this script has been written. # Installation -Download [here](https://github.com/majojoe/domain_join/releases/download/v1.0.16/domain-join-1.0.16-linux-amd64.deb) and install the \*.deb package provided using the following command: +Download [here](https://github.com/majojoe/domain_join/releases/download/v1.0.17/domain-join-1.0.17-linux-amd64.deb) and install the \*.deb package provided using the following command: ```bash -sudo apt install ./domain-join-1.0.16-linux-amd64.deb +sudo apt install ./domain-join-1.0.17-linux-amd64.deb ``` # Join a domain Execute the join script as so: diff --git a/src/domain_join.sh b/src/domain_join.sh index aebbcb5..69cc19a 100644 --- a/src/domain_join.sh +++ b/src/domain_join.sh @@ -341,13 +341,17 @@ set_sudo_users_or_groups() { #use fully qualified domain names echo "\"${I_NO_SPACE}@${DN}\" ALL=(ALL:ALL) ALL" >> "${SUDOERS_AD_FILE}" if ! [[ "${I_NO_SPACE}" = %* ]]; then + set +e usermod -aG sudo "${I_NO_SPACE}@${DN}" + set -e echo "${I_NO_SPACE}@${DN}" >> "${DU_SUDO_FILE}" fi else echo "\"${I_NO_SPACE}\" ALL=(ALL:ALL) ALL" >> "${SUDOERS_AD_FILE}" if ! [[ "${I_NO_SPACE}" = %* ]]; then + set +e usermod -aG sudo "${I_NO_SPACE}" + set -e echo "${I_NO_SPACE}" >> "${DU_SUDO_FILE}" fi fi