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

Andrew Perrin - Demography aperrin at demog.Berkeley.EDU
Tue Feb 2 04:09:35 GMT 1999


unless I'm misunderstanding your message, I think your problem is simple:
the -m flag on smbpasswd adds the $ for you; if your machine is named
BONKERS and its associated /etc/passwd entry is for BONKERS$, you should
just do smbpasswd -a -m bonkers .

Hope this helps-
Andy

---------------------------------------------------------------------
Andrew J. Perrin - aperrin at demog.berkeley.edu - NT/Unix Admin/Support
Department of Demography    -    University of California at Berkeley
2232 Piedmont Avenue #2120  -    Berkeley, California, 94720-2120 USA
http://demog.berkeley.edu/~aperrin --------------------------SEIU1199

On Tue, 2 Feb 1999, Bill Nugent wrote:

> 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