smbpasswd program broken
Michael Keightley
mk at quadstone.com
Mon Nov 16 12:47:03 GMT 1998
Just downloaded the latest version of 2.0 via cvs. When I try to add a machine
(which is in the NIS password file) using the command:
% smbpasswd -a -m odin
I get the error:
User "odin" was not found in system password file.
I managed to fix it by putting this bit of code back into smbpasswd.c
if(trust_account) {
int username_len = strlen(user_name);
if(username_len >= sizeof(pstring) - 1) {
fprintf(stderr, "%s: machine account name too long.\n", user_name);
exit(1);
}
if(user_name[username_len-1] != '$') {
user_name[username_len] = '$';
user_name[username_len+1] = '\0';
}
}
(before the lines
if(!remote_machine && ((pwd = Get_Pwnam(user_name, True)) == NULL)) {
fprintf(stderr, "%s: User \"%s\" was not found in system password file.\
n",
prog_name, user_name);
exit(1);
}
)
Is it broken, or has the functionality changed?
Michael
_________
Michael Keightley <mk at quadstone.com> Tel: +44 131 220 4491
Systems Manager Fax: +44 131 220 4492
Quadstone Limited WWW: http://www.quadstone.com
More information about the samba-ntdom
mailing list