Andrew Gray
2002-Jun-17 10:34 UTC
[Samba] Fix for smbpasswd Samba 2.2.4 on Solaris only taking 8 character passwords
Under Samba 2.2.4 (and possibly earlier), smbpasswd (when run locally) only really reads the first 8 characters, as opposed to the full password. Obviously, this can cause mass confusion. :) The fix is pretty simple (I would offer a diff, but this is the kind of thing the configure script should check for...) - under Solaris getpass() will only return 8 characters - you must use getpassphrase() to get up to 256 characters (same syntax as getpass). So, under source/utils/smbpasswd.c, line 670, change p = getpass(prompt); to p = getpassphrase(prompt); And it works properly. --- Andrew Gray Systems Administrator University of Nevada, Las Vegas College of Engineering
Gerald Carter
2002-Jun-17 13:26 UTC
[Samba] Fix for smbpasswd Samba 2.2.4 on Solaris only taking 8 character passwords
On Mon, 17 Jun 2002, Andrew Gray wrote:> Under Samba 2.2.4 (and possibly earlier), smbpasswd (when run locally) only > really reads the first 8 characters, as opposed to the full password. > Obviously, this can cause mass confusion. :) > > The fix is pretty simple (I would offer a diff, but this is the kind of > thing the configure script should check for...) - under Solaris getpass() > will only return 8 characters - you must use getpassphrase() to get up to > 256 characters (same syntax as getpass). > > So, under source/utils/smbpasswd.c, line 670, change > > p = getpass(prompt); > > to > > p = getpassphrase(prompt); > > And it works properly.This is actually a wrong fix. We attempt to override with our own internal getpass() function. This works fine on every Solaris box I have to test on. Can you check and see if REPLACE_GETPASS is defined in include/config.h ? I need to know why the test is failing on certain Solaris boxes. Any help woulf be appreciated. cheers, jerry --------------------------------------------------------------------- Hewlett-Packard http://www.hp.com SAMBA Team http://www.samba.org -- http://www.plainjoe.org "Sam's Teach Yourself Samba in 24 Hours" 2ed. ISBN 0-672-32269-2 --"I never saved anything for the swim back." Ethan Hawk in Gattaca--
Andrew Bartlett
2002-Jun-18 07:33 UTC
[Samba] Fix for smbpasswd Samba 2.2.4 on Solaris only taking 8 character passwords
Jeremy Allison wrote:> This has been fixed in the SAMBA_2_2 CVS code, the GETPASS > check now looks like : > > AC_CACHE_CHECK([whether getpass should be replaced],samba_cv_REPLACE_GETPASS,[ > SAVE_CPPFLAGS="$CPPFLAGS" > CPPFLAGS="$CPPFLAGS -I${srcdir-.}/ -I${srcdir-.}/include -I${srcdir-.}/ubiqx -I${srcdir-.}/popt -I${srcdir-.}/smbwrapper" > .... > > Note that the popt directory is now included.Should we try to use a system getpassphrase() instead of our own getpass(), if available? Andrew Bartlett -- Andrew Bartlett abartlet@pcug.org.au Manager, Authentication Subsystems, Samba Team abartlet@samba.org Student Network Administrator, Hawker College abartlet@hawkerc.net http://samba.org http://build.samba.org http://hawkerc.net
Jeremy Allison
2002-Jun-18 10:20 UTC
[Samba] Fix for smbpasswd Samba 2.2.4 on Solaris only taking 8 character passwords
On Wed, Jun 19, 2002 at 12:28:27AM +1000, Andrew Bartlett wrote:> > Should we try to use a system getpassphrase() instead of our own > getpass(), if available?No, the whole getpassphrase() thing is a hack. getpass() should cope with arbitrary length strings. Jeremy.