1 Index: source/utils/net_ads.c
2 ===================================================================
3 RCS file: /cvsroot/samba/source/utils/net_ads.c,v
4 retrieving revision 1.37.2.22
5 diff -u -r1.37.2.22 net_ads.c
6 --- source/utils/net_ads.c 10 Jun 2003 04:15:55 -0000 1.37.2.22
7 +++ source/utils/net_ads.c 20 Jun 2003 19:59:36 -0000
9 "\n\tdump the machine account details to stdout\n"
11 "\n\tperform a CLDAP search on the server\n"
12 -"\nnet ads password <username@realm> -Uadmin_username@realm%%admin_pass"\
13 +"\nnet ads password <username@realm> <password> -Uadmin_username@realm%%admin_pass"\
14 "\n\tchange a user's password using an admin account"\
15 -"\n\t(note: use realm in UPPERCASE)\n"\
16 +"\n\t(note: use realm in UPPERCASE, prompts if password is obmitted)\n"\
17 "\nnet ads changetrustpw"\
18 "\n\tchange the trust account password of this machine in the AD tree\n"\
19 "\nnet ads printer [info | publish | remove] <printername> <servername>"\
26 d_printf("ERROR: You must say which username to change password for\n");
33 - asprintf(&prompt, "Enter new password for %s:", user);
35 - new_password = getpass(prompt);
37 + new_password = (char *)argv[1];
39 + asprintf(&prompt, "Enter new password for %s:", user);
40 + new_password = getpass(prompt);
44 ret = kerberos_set_password(ads->auth.kdc_server, auth_principal,
45 auth_password, user, new_password, ads->auth.time_offset);
46 if (!ADS_ERR_OK(ret)) {
47 d_printf("Password change failed :-( ...\n");
53 d_printf("Password change for %s completed.\n", user);