Lines 515-527
join_ad_domain()
Link Here
|
515 |
set_hostname "$host_name.$ldomain" |
515 |
set_hostname "$host_name.$ldomain" |
516 |
|
516 |
|
517 |
# Join to domain |
517 |
# Join to domain |
518 |
$net_cmd ads join -U"$user%$password" | grep -v '^Using short domain name' |
518 |
$net_cmd ads join -U"$user%$password" --no-dns-updates |
519 |
|
519 |
|
520 |
[ "$?" -ne 0 ] && return 1 |
520 |
[ "$?" -ne 0 ] && return 1 |
521 |
|
521 |
|
522 |
# Register machine in domain DNS |
522 |
# Register machine in domain DNS |
523 |
if [ -n "$host_name" ]; then |
523 |
if [ -n "$host_name" ]; then |
524 |
$net_cmd ads dns register -U"$user%$password" "$FQDN" |
524 |
$net_cmd ads dns register -U"$user%$password" "$host_name.$ldomain" |
525 |
fi |
525 |
fi |
526 |
|
526 |
|
527 |
# Destroy ticket |
527 |
# Destroy ticket |
528 |
- |
|
|