Date: Tue, 6 Jun 2017 12:00:34 +0200 From: Matthias Apitz <guru@unixarea.de> To: freebsd-questions@freebsd.org Subject: mount_smbfs gives error when stored crypted pw is used Message-ID: <20170606100034.GA4245@c720-r314251>
next in thread | raw e-mail | index | archive | help
--UugvWAfsgieZRqgk Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hello, At work I have to run FreeBSD (12-CURRENT, amd64) in vbox on Win7 host and used successful mount_smbfs to mount the hosts disk to FreeBSD. This worked fine until the last password change of the domain pw we have todo every 12 weeks or so. Now the new crypted and stored pw from /etc/nsmb.conf is not accepted anymore. In detail, when I do: # cat pw-file.txt SXXXXXXXXXXXXXXXXXXXXXX!=20 and take the above pw with cut&paste in the mouse and run the command, I'm prompted for the pw (because I removed it from the file /etc/nsmb.conf); the mount is fine: # mount_smbfs -I 10.49.8.27 -U apitzXXXXXX -u guru -g wheel //apitzXXXXXX-l= toh/Users/apitzXXXXXX /win Password: # now I crypt the pw which I still have in the mouse due to cut&paste and store the hash in the file: # smbutil crypt Password: $$xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx1713 # tail -5 /etc/nsmb.conf=20 [APITZXXXXXX-LTOH:APITZXXXXXX] workgroup=3DOCLC password=3D$$xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx1713 (and you may believe me, I did it around 10 times to check it); now the mount failes: # mount_smbfs -I 10.49.8.27 -U apitzXXXXXX -u guru -g wheel //apitzXXXXXX-l= toh/Users/apitzXXXXXX /win mount_smbfs: unable to open connection: syserr =3D Authentication error all this is fine reproduceable: the pw works when typed, it does not work from the file /etc/nsmb.conf; it works as well from the file, when I store it there in clear text, i.e. not encrypted with smbutil. That means somehow the hash seems to be wrong. I checked both cases ith truss(1): truss in error case: openat(AT_FDCWD,"/dev/nsmb",O_RDWR,00) =3D 3 (0x3) ioctl(3,SMBIOC_LOOKUP,0xffffd9d8) ERR#80 'Authentication err= or' write(2,"mount_smbfs: ",13) =3D 13 (0xd) write(2,"unable to open connection",25) =3D 25 (0x19) stat("/usr/share/nls/C/libc.cat",0x7fffffffd378) ERR#2 'No such file or dir= ectory' stat("/usr/share/nls/libc/C",0x7fffffffd378) ERR#2 'No such file or dir= ectory' stat("/usr/local/share/nls/C/libc.cat",0x7fffffffd378) ERR#2 'No such file = or directory' stat("/usr/local/share/nls/libc/C",0x7fffffffd378) ERR#2 'No such file or d= irectory' write(2,": syserr =3D Authentication error"...,32) =3D 32 (0x20) truss in success case (i.e. with typed password) openat(AT_FDCWD,"/dev/nsmb",O_RDWR,00) =3D 3 (0x3) ioctl(3,SMBIOC_LOOKUP,0xffffd9d8) =3D 0 (0x0) nmount(0x801251140,0x14,0x0) =3D 0 (0x0) Any ideas about this? matthias --=20 Matthias Apitz, =E2=9C=89 guru@unixarea.de, =E2=8C=82 http://www.unixarea.d= e/ =E2=98=8E +49-176-38902045 Public GnuPG key: http://www.unixarea.de/key.pub --UugvWAfsgieZRqgk Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEXmn7rBYYViyzy/vBR8z35Hb+nREFAlk2fTkACgkQR8z35Hb+ nRFVAg//WytisFZ93a/PoyFr/UADc4RidCkXqO2AwBQij5V1JdN2p96Rqk0NA/n7 FjndDYbu+SMYsRafxr0puOwZcfYXvI7V1ZESR64dp9orbIraOkdP584/tMWotwMw 9Xdq9yVmS7uq1ASjCLr2JSMe2dxZR+kxWvOQ1Bp8o1hAlxy2Q6ERfnJOp2cV7cuq DtJ6Lv9P71bpnv19jDmiBecOmBXyHhlQWaf+f9MHNn0b+7dOVCum1NBR4VOeTDcc R+cX5NWkjSzd2uRlqlXyW1M1u12E6E4zUKSA9oXXmhLl667wtQbvRa5UpU9srNLY ane6X0LdF4w4WLB1aq+0cb5fk51bopJ1OvU9Oi32quA/iQVeylw7Bw3pac89wemE IuOL/oBDttN6xfcOPFCoKyXLwuwxgXaDJqs0PKxpdhl4yRF9XaGvcu+P6eigL8Sf qAy9aW2qscyVLkPkdGURcpUMIM065mbtnw1+Sf+PGkrNLQGNKihmwuCowgXdlwTG dCFSH1zzfAMTg2DSSJZ3ZwcCDHuPvVQH7EgNH3DJDsS8fas5uxgP4BnWC6HVsXEU JYc0D8HFDccbIv51vOfxIRwSPwQWi5hfTj/MWvDFs3dIRBTIA3c8h8phUTqmlVAD ew8N0aBAEIbbhJd/cWLLibd/jnyNpP2GkPlROUyqeZfCqryWRcY= =m6yc -----END PGP SIGNATURE----- --UugvWAfsgieZRqgk--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20170606100034.GA4245>