vms_tdb.c modifications

John Santos john.santos at post.harvard.edu
Sat Jun 28 22:47:23 GMT 2003


At 12:39 PM 6/26/2003 -0500, Steve Stapleton wrote:
>I have successfully downloaded the Samba kit and re-linked it on an
>AlphaStation 255 running VMS 7.2-2 and TCPIP V5.0A.  The were no errors
>during the linking process and the install procedure did not report any
>errors.  I was able to access a test share right after the install however
>there were a few logicals that did not get defined properly after the reboot
>but that is now fixed.  The problem I'm having now is trying to use the
>SMBPASSWD command to add the VMS system to the NT domain.  I set the symbol
>SMBPASSWD :== "$SAMBA_ROOT:[BIN]SAMPASSWD" but every time I use it I get the
>SMBPASSWD help display.  I have tried entering the command in several ways
>using various combinations of quoted and unquoted parameter strings but I
>still get the help message.
>
>         SMBPASSWD "-j" DOMAIN "-r" MACHINE -Uadministrator%password
>         SMBPASSWD "-j DOMAIN -r MACHINE -Uadministartor%password"

I had problems with the various Samba utilities until I started consistently
quoting each parameter separately.  In particular, I think DCL upcases
all unquoted parameters and then the C RTL downcases them again.
I think that makes the "-U" in your 1st example become "-u" by the time
SMBPASSWD sees it.

You would think that if you quoted the complete parameter string (as in
your second example), it would work, but I always have problems with
this (for example when using NMBLOOKUP.)

(Maybe what is happening is the C program sees the entire parameter
string as the 1st  element of  argv[],  i.e. argc=2, argv[0]="smbpasswd"
and argv[1]="-j DOMAIN -r  MACHINE -Uadministartor%password")

What SMBPASSWD needs to see in this case is argc=6 and
argv[0]="smbpasswd",
argv[1]="-j",
argv[2]="DOMAIN"
argv[3]="-r"
argv[4]="MACHINE"
argv[5]="-Uadministrator%password"

In your 1st example, I think it would see exactly this (with the admistrator
and password both having been upcased and then downcased again
by DCL and the C RTL), except the "U" in the last arg would end up
being a "u".

So I would try:

     SMBPASSWD "-j" DOMAIN "-r" MACHINE "-Uadministrator%password"

(I think on Alpha VMS 7.3.-1, with parsing style set appropriately, you can
dispense with most or all these quotation marks, but I haven't tried it.)

HTH

>The commands above are just two examples I've tried but all I get is the
>help screen.  Is there something I'm missing here?
>
>Thanks
>Steven J. Stapleton
>Risk Management Alternatives
>Office: 614-944-5626
>Email: Steve.Stapleton at RMAinc.net

John Santos




More information about the samba-vms mailing list