{"forcepwchangenextlogin",I18N_NOOP("Force the user to change password on next login"),0},
{"username <username>",I18N_NOOP("Specifies the user name in the Kerberos realm"),0},
{"password <username>",I18N_NOOP("Sets the password for the specified account to the given value"),0},
{"username <username>",I18N_NOOP("Specifies the user name in the Kerberos realm (mandatory)"),0},
{"uid <user id>",I18N_NOOP("Specifies the POSIX user ID in the Kerberos realm"),0},
{"password <password>",I18N_NOOP("Sets the password for the specified account to the given value"),0},
{"displayname <full name>",I18N_NOOP("Sets the display name (common name) of the specified account to the given value"),0},
{"homedirectory <full path>",I18N_NOOP("Sets the home directory of the specified account to the given value"),0},
{"givenname <first name>",I18N_NOOP("Sets the first name of the specified account to the given value"),0},
{"surname <last name>",I18N_NOOP("Sets the last name of the specified account to the given value"),0},
{"group <groupname>",I18N_NOOP("Sets membership of the specified account in the groups listed on the command line, and revokes membership in any groups not listed. This option may be used multiple times."),0},
{"revokeallgroups",I18N_NOOP("Revokes membership of the specified account for all groups"),0},
{"!+command",I18N_NOOP("The command to execute on the Kerberos realm. Valid commands are: adduser"),0},
{"adminusername <username>",I18N_NOOP("Specifies the username of the administrative user with permissions to perform the requested task"),0},
{"adminpasswordfile <password file>",I18N_NOOP("Specifies the location of a file which contains the password of the administrative user"),0},
{"!+command",I18N_NOOP("The command to execute on the Kerberos realm. Valid commands are: adduser deluser"),0},
{"!+realm",I18N_NOOP("The Kerberos realm on which to execute the specified command. Example: MY.REALM"),0},
{"",I18N_NOOP("This utility will use GSSAPI to connect to the realm controller. You must own an active, valid Kerberos ticket in order to use this utility!"),0},
TDECmdLineLastOption// End of options.
@ -96,7 +103,22 @@ int main(int argc, char *argv[])
printf("[ERROR] Unable to set password for user\n\r[ERROR] Detailed debugging information: %s\n\r",errorString.ascii());
}
ldapmanager.unbind(true);// Using kadmin on admin users/groups can disrupt our LDAP connection (likely due to the ACL rewrite)
}
}
else{
printf("[ERROR] Unable to add user with distingushed name '%s'\n\r[ERROR] Detailed debugging information: %s\n\r",user.distinguishedName.ascii(),errorString.ascii());
}
}
elseif(command=="deluser"){
LDAPUserInfodeluser;
TQStringerrorString;
if(ldapmanager.bind(&errorString)!=0){
printf("[ERROR] Unable to bind to Kerberos realm controller\n\r[ERROR] Detailed debugging information: %s\n\r",errorString.ascii());