[Samba] How to create users accounts with already
encrypted passwords ?
Francois.clemence at univ-metz.fr
Francois.clemence at univ-metz.fr
Thu Nov 27 19:11:55 GMT 2008
I don't have the plain password for creating users in Samba only Lanman Hash and NT hash from the text file !
C.
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Clemence wrote:
> > Hi, i need to create users accounts into Samba with already encrypted
> > passwords from a file. I use tdbsam backend and Samba 3.0.24 (Debian Etch)
> >
> > The file format is quite easy :
> > login1|Unix_passwd|Lanman Password Hash|NT Password Hash
> >
> > First, i create the unix users with their already encrypted password :
> > useradd -p Unix_passwd login1.
> > Fine.
> >
> > But can i do the same thing with smbpasswd or pdbedit ? I haven't found
> > anything about this.
> > How can i do ?
>
> Look at the -s flag in man smbpasswd to accept STDIN as the input method
> for the password change. If I recall correctly, you end up with
> something like:
>
> echo password\npassword\n | smbpasswd -s
>
> Good?
>
> - --
> ---- _ _ _ _ ___ _ _ _
> |Y#| | | |\/| | \ |\ | | |Ryan Novosielski - Systems Programmer II
> |$&| |__| | | |__/ | \| _| |novosirj at umdnj.edu - 973/972.0922 (2-0922)
> \__/ Univ. of Med. and Dent.|IST/AST - NJMS Medical Science Bldg - C630
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.6 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iD8DBQFJLuJLmb+gadEcsb4RAsuXAKC9Mv0p5m5SnSQnH5rh2Qw76TiFMACgq910
> I1eAaqcGzfEIwRK0KI/tjkA=
> =1r8B
> -----END PGP SIGNATURE-----
More information about the samba
mailing list