Hello everybody,

Thanks to Jelmers help im now able to use mysql support sucessfully (thanks again 
Jelmer).

I now need a way to generate NT4/LM hashes so i can insert new accounts without using 
smbpasswd.
Has anybody got a script/windows program/cgi/whatever to do this?

I cant find any function to generate a NT4/LM hash!

My problem is im coding a windows program to generate/manage all the users on the 
system and i want to be able to do it in ONE single step!

Its pretty stupid having to add the users on the windows machine and then go to the 
server terminal and execute
smbpasswd -a user password

(heh..sorry for my bad english, i hope i made my self clear :o)

Thanks in advance,
+-----------------------------------------
| Lu�s Miguel Silva
| Network Administrator@ ISPGaya.pt
| Rua Ant�nio Rodrigues da Rocha, 291/341 
| Sto. Ov�dio � 4400-025 V. N. de Gaia
| Portugal
| T: +351 22 3745730/3/5  F: +351 22 3745738
| G: +351 93 6371253      E: [EMAIL PROTECTED]
| H: http://lms.ispgaya.pt/
+----------------------------------------- 

-----Mensagem original-----
De: Jelmer Vernooij [mailto:[EMAIL PROTECTED] nome de
Jelmer Vernooij
Enviada: s�bado, 27 de Setembro de 2003 17:55
Para: Lu�s Miguel Silva
Cc: [EMAIL PROTECTED]
Assunto: Re: [Samba] pdb_mysql question...


Hi,

On Sat, Sep 27, 2003 at 05:54:56PM +0100, Lu�s Miguel Silva wrote about 'RE: [Samba] 
pdb_mysql question...':
> However..im getting another problem.
> I thought "smbpasswd -a user password" would create the user on the db...but it 
> doesnt:

> [EMAIL PROTECTED] /usr/local/samba/bin# ./smbpasswd -a user password
> Connecting to database server, host: localhost, user: samba, password: ambas, 
> database: samba, port: 3306
> Failed initialise SAM_ACCOUNT for user user.
> Failed to modify password entry for user user
> [EMAIL PROTECTED] /usr/local/samba/bin#

> (on the mysql server i see this:)
> 030927 17:48:28      42 Connect     [EMAIL PROTECTED] on samba
>                      42 Query       SELECT 
> logon_time,logoff_time,kickoff_time,pass_last_set_time,pass_can_change_time,pass_must_change_time,username,domain,nt_username,nt_fullname,home_dir,dir_drive,logon_script,profile_path,acct_desc,workstations,unknown_str,munged_dial,user_sid,group_sid,lm_pw,nt_pw,NULL,acct_ctrl,unknown_3,logon_divs,hours_len,unknown_5,unknown_6
>  FROM user WHERE username = 'user'

> Which evidently tells me it is trying to GET the account before changing it!
It checks whether the account already exists. Oh, make sure there is a
unix account named 'user' before you add a Samba account with such a
name.

> Poking around the binaries i saw this new one:
> [EMAIL PROTECTED] /usr/local/samba/bin# ./pdbedit -a user
> Server's Role (logon server) NOT ADVISED with domain-level security
> Connecting to database server, host: localhost, user: samba, password: ambas, 
> database: samba, port: 3306
> Connecting to database server, host: localhost, user: samba, password: ambas, 
> database: samba, port: 3306
> could not create account to add new user user
> [EMAIL PROTECTED] /usr/local/samba/bin#

> and on the mysql server i see:
> 030927 17:50:11      45 Connect     [EMAIL PROTECTED] on samba
>                      46 Connect     [EMAIL PROTECTED] on samba

> It just connects and logs off!
Probably because there's no unix account for the user yet...

> How do i had a user/change its password?

> Is there any official howto on how to (sucessfully) use pdb_mysql???
Read the HOWTO collection from the tarball and/or read
the version generated out of CVS at http://samba.vernstok.nl/.

Jelmer
-- 
Jelmer Vernooij                                              <[EMAIL PROTECTED]>
http://samba.org/~jelmer/                             http://samba.vernstok.nl/
Last CVS commit: Fri Sep 26 12:22:04 2003 (1d 4h 30m ago)
Bugs in bugzilla: 14 
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  http://lists.samba.org/mailman/listinfo/samba

Reply via email to