[Samba] Too many smbd processes?

2003-03-04 Thread Maarten Buiter
Hello People,

/etc/rc.d/init.d/smb status yields the following output:

smbd (pid 31224 31209 31102 31098 31077 31069 31056 3237 3171 3154 3147 
3144 3131 3129 3128 3124 3119 3091 3077 2590 2582 2564 2491 2468 1964) 
is running...
nmbd (pid 31062 31061) is running...

In total 25 smbd's and 2 nmbd's, while only five or six users actually 
use the samba-server.

This many processes causes my system to have a load around 19 to 25, 
which prevent
my sendmail from sending mail.

Does anybody know if this is normal samba behaviour? Restarting Samba 
doesn't seem
to limit the number of servers.

Kind regards,

Maarten

--
To unsubscribe from this list go to the following URL and read the
instructions:  http://lists.samba.org/mailman/listinfo/samba


[Samba] Scripting with smbpasswd

2003-02-26 Thread Maarten Buiter
Hi All,

I'm writing a website on which users can change their Samba-password.

I therefore use the smbpasswd-utility which I execute through the PHP
function system (or exec, it doesn't really matter). I have to use the 
-s switch
for smbpasswd to enable it to read input from STDIN, which I redirect to
read the information from a file.

I execute:

/usr/local/samba/bin/smbpasswd -r ldap.domain.org -s -U maarten  
/tmp/password.txt

and the file password.txt contains the old password, and twice (or once, 
also doesn't
seem to matter) the new password formatted like this:

oldpassword
newpassword
newpassword.
The output from smbpasswd is: 'Password changed for user maarten', which 
looks quite
OK to me. But... the encrypted password does not at all look like the 
encrypted 'newpassword'
as would be generated by a 'manual' run of smbpasswd. Worse, every time 
I use another 'newpassword' the encoding of its encrypted equivalent 
remains the same.

Does anybody know what I'm doing wrong? I probably feed the passwords to 
smbpasswd totally wrong, but, how should it be done?

Many, many thanks in advance!

Maarten

--
To unsubscribe from this list go to the following URL and read the
instructions:  http://lists.samba.org/mailman/listinfo/samba


Re: [Samba] Scripting with smbpasswd

2003-02-26 Thread Maarten Buiter
Hi Florian, and rest!

Problem has been solved! It had nothing to do with PHP, since I use a 
shell to create the text-file:

system(echo 'temporary\npassword_new\npassword_new'  /tmp/ . $userCN);
system(/usr/local/samba/bin/smbpasswd -r ldap.domain.org -s -U  . 
$userCN .   /tmp/ . $userCN .  21 /tmp/log.txt);
exec(rm -rf /tmp/ . $userCN);

The problem was that apparently smbpasswd only reads the first line from 
the created file,
uses that to check whether it is the right old password, and then 
continues to read from
the 'command line', which provided 21 /tmp/log.txt, which was 
encoded to make a samba password.

Removing the 21 /tmp/log.txt did the trick. It now reads the other 
two lines from the created file,
and uses the information for the new password. Maybe I did something out 
of the ordinary, or this is
some unexplained behaviour from smbpasswd.. I know samba 2.2.8 comes 
with a bugfix for some
bug in smbpasswd when reading passwords from the command line... Maybe 
this was due to this bug.

Thanks anyway!

Maarten

Florian Stahl wrote:

Maarten,

have you considered your bug being a PHP matter?!
with my experience with Perl and PHP handling ASCI files is sometimes
tricking in the matter of processing Carriage Returns and Line Feeds.
maybe it is an idea to check if the lines in your /tmp/passwd.txt contain
any of these Characters?!, I think they are 'chr(10)' and 'chr(13)'?!
kind regardes

Florian
([EMAIL PROTECTED])


 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of
Maarten Buiter
Sent: Wednesday, February 26, 2003 3:08 PM
To: [EMAIL PROTECTED]
Subject: [Samba] Scripting with smbpasswd
Hi All,

I'm writing a website on which users can change their Samba-password.

I therefore use the smbpasswd-utility which I execute through the PHP
function system (or exec, it doesn't really matter). I have 
to use the 
-s switch
for smbpasswd to enable it to read input from STDIN, which I 
redirect to
read the information from a file.

I execute:

/usr/local/samba/bin/smbpasswd -r ldap.domain.org -s -U maarten  
/tmp/password.txt

and the file password.txt contains the old password, and 
twice (or once, 
also doesn't
seem to matter) the new password formatted like this:

oldpassword
newpassword
newpassword.
The output from smbpasswd is: 'Password changed for user 
maarten', which 
looks quite
OK to me. But... the encrypted password does not at all look like the 
encrypted 'newpassword'
as would be generated by a 'manual' run of smbpasswd. Worse, 
every time 
I use another 'newpassword' the encoding of its encrypted equivalent 
remains the same.

Does anybody know what I'm doing wrong? I probably feed the 
passwords to 
smbpasswd totally wrong, but, how should it be done?

Many, many thanks in advance!

Maarten

--
To unsubscribe from this list go to the following URL and read the
instructions:  http://lists.samba.org/mailman/listinfo/samba
   



--
To unsubscribe from this list go to the following URL and read the
instructions:  http://lists.samba.org/mailman/listinfo/samba