[Samba] How to create users accounts with already
encrypted passwords ?
Aaron Maley
aaronm at edgewater.ca
Fri Nov 28 16:51:07 GMT 2008
I'm maybe completely misunderstanding the question here, but would it
not be fairly trivial to create a valid smbpasswd file using the info
you have and then use the -i and -e switches from pdbedit(check the
manpage) to export that info into the tdbsam files?
Clemence wrote:
> I also have Unix Hash !! I have :
> *- User login
> - Unix Hash
> - LanMan Hash
> - NT Hash.*
> in this text file. I need to create samba users from this file.
>
> I could use a smbpasswd file and a script to inject the correct
> passwords hashs...
> But how to inject Lanman et NT hash directly into Samba with a tdbsam
> backend ? Is it possible ?
>
>
>
>
> Ryan Bair a écrit :
>> You can't create the UNIX hash from the NT hash as they are different
>> 1 way transformations. As an alternative, you could have PAM
>> authenticate using winbind which would probably give the desired
>> effect.
>>
>> On Thu, Nov 27, 2008 at 2:11 PM, <Francois.clemence at univ-metz.fr>
>> wrote:
>>
>>> 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-----
>>>>
>>> --
>>> To unsubscribe from this list go to the following URL and read the
>>> instructions: https://lists.samba.org/mailman/listinfo/samba
>>>
>>>
>>
>>
>>
More information about the samba
mailing list