diff options
author | Günther Deschner <gd@samba.org> | 2006-06-09 10:50:28 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 11:17:21 -0500 |
commit | bf7a5433b4da564c5298e856cdd46383b8998bb2 (patch) | |
tree | 9eb69b007167d67c0e386467c7f8185b8a5e534f /source3/utils | |
parent | 33c918b11a6f143d4202df64ad76dde29a807f44 (diff) | |
download | samba-bf7a5433b4da564c5298e856cdd46383b8998bb2.tar.gz samba-bf7a5433b4da564c5298e856cdd46383b8998bb2.tar.bz2 samba-bf7a5433b4da564c5298e856cdd46383b8998bb2.zip |
r16115: Make "net ads changetrustpw" work again.
(adapt to the new UPN/SPN scheme).
Guenther
(This used to be commit 8fc70d0df0c93c29b49f924bac9ff5d9857cfd9d)
Diffstat (limited to 'source3/utils')
-rw-r--r-- | source3/utils/net_ads.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source3/utils/net_ads.c b/source3/utils/net_ads.c index e701803d17..e82eece0f9 100644 --- a/source3/utils/net_ads.c +++ b/source3/utils/net_ads.c @@ -1529,19 +1529,19 @@ int net_ads_changetrustpw(int argc, const char **argv) fstrcpy(my_name, global_myname()); strlower_m(my_name); - asprintf(&host_principal, "%s@%s", my_name, ads->config.realm); - d_printf("Changing password for principal: HOST/%s\n", host_principal); + asprintf(&host_principal, "%s$@%s", my_name, ads->config.realm); + d_printf("Changing password for principal: %s\n", host_principal); ret = ads_change_trust_account_password(ads, host_principal); if (!ADS_ERR_OK(ret)) { - d_fprintf(stderr, "Password change failed :-( ...\n"); + d_fprintf(stderr, "Password change failed: %s\n", ads_errstr(ret)); ads_destroy(&ads); SAFE_FREE(host_principal); return -1; } - d_printf("Password change for principal HOST/%s succeeded.\n", host_principal); + d_printf("Password change for principal %s succeeded.\n", host_principal); if (lp_use_kerberos_keytab()) { d_printf("Attempting to update system keytab with new password.\n"); |