Samba 2.1 pre-release okay - RedHat 5.2/glibc is my problem

Bill Nugent whn at topelo.lopi.com
Tue Feb 2 03:42:59 GMT 1999


Howdy,

I reported earlier that I could not get smbpasswd to work properly - 
"smbpasswd -m 'bonkers$'" is one example.  I think I may have found a 
problem - getpwnam() doesn't work when '$' is the last character of the 
name.  I'm running RedHat Linux 5.2 with glibc-2.0.7-29 and my 
/etc/passwd (and /etc/shadow) have an entry for bonkers$:

bonkers$:4999:5000:bonkers to use NT:/home/samba/Machines:/bin/false

My test program:

$ cat test.c
#include <stdio.h>
#include <pwd.h>
#include <sys/types.h>

main(int argc, char *argv[])
{
  struct passwd *p = getpwnam(argv[1]);

  printf("%s = %x\n", argv[1], p);
}

And some results:

$ ./test joe		# Dummy user joe - an entry is returned
joe = 400ae2d8
$ ./test 'bonkers$'	# And this is broken
bonkers$ = 0

I tried escaping the dollar sign in case there was an RE involved...no 
such luck.

I submitted a bug report to RedHat.  I took a look at the glibc source 
and it is appears to be non-trivial (multiple levels of macros) and I do 
not have the cycles to spare looking into this problem as well...sigh.

	Bill



More information about the samba-ntdom mailing list