Samba pre-2.0.7 snapshot available.

Giulio Orsero giulioo at
Mon Jan 31 11:04:04 GMT 2000

On Sat, 29 Jan 2000 14:21:56 +1100, hai scritto:

>I have made a tarball snapshot of Samba pre-2.0.7
rh61, 2.2.14 + smbfs-nls.patch
I refer to pre-2.0.7 as 2.0.7

I know some of the following problems may be considered not worth the
time needed to solve them, because they are not functional issues,
however, here are my observations on 2.0.7 and 2.0.x in general.

== 1) print command parameter: initialization (NEW in 2.0.7)
I don't use  [printers] / "load printers".
I create a share for every printer. So far I've used "print command" in
the global section to affect every printer share.

With 2.0.7 this doesn't work anymore: I need to put the "print
command" in every print share to make it works. Samba ignores the "print
command" put in the global section.

Is this part of an intentional change to the print command

$ testparm -s |grep "print command"
        print command = lpr -r -P%p %s
$ grep "print command" /etc/samba/smb.conf
print command = lpr -r -l -P %p %s
(the -l is missing in testparm)

== 2) socket options errors (NEW since 2.0.6)
I use 
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
and avery once in a while I keep getting (note the KEEPALIVE):

[2000/01/29 10:18:59, 0] lib/util_sock.c:set_socket_options(148)
  Failed to set socket option SO_KEEPALIVE (Error Bad file descriptor)
[2000/01/29 10:18:59, 0] lib/util_sock.c:set_socket_options(148)
  Failed to set socket option TCP_NODELAY (Error Bad file descriptor)
[2000/01/29 10:18:59, 0] lib/util_sock.c:set_socket_options(148)
  Failed to set socket option SO_RCVBUF (Error Bad file descriptor)
[2000/01/29 10:18:59, 0] lib/util_sock.c:set_socket_options(148)
  Failed to set socket option SO_SNDBUF (Error Bad file descriptor)
[2000/01/29 10:18:59, 1] smbd/password.c:pass_check_smb(496)

== 3) smbpasswd: delete user switch
smbpasswd still lacks the promised :-) "delete user" switch.

== 4) docs
- DOMAIN.txt is to be updated for logon_path/logon_home switch for
- smbmount.txt: every occurrence of smb should be changed in smbfs
- man smbmount: smb --> smbfs, mount.smb --> mount.smbfs
- grepping the tarball for samba-bugs at give many matches. The
last time I checked it, it told me it's now better to post to the
samba at list.
- A.Tridgell said that "writable" as no effect for a print share
> The setting of the writeable parameter doesn't seem to have any effect
> on access to the printer so what does setting writeable = no actually
> do?

it doesn't do anything :)
if this is true then the following example, and its comment, in man
                 path = /usr/spool/public
                 writeable = false
                 printable = true
                 guest ok = true
is misleading.
The same is true for occurrences in PRINTER_DRIVER.txt and Faxing.txt.
I think it's better to take out every writable/read only/write ok
parameters from print shares examples if they don't do anything.

== 5) profiles saga (NEW since 2.0.6)
I think the release notes should clearly state that a backward
incompatible change was made (starting with 2.0.6) in samba to make it
compatible with nt. I see the man pages are ok, but I 
If someone is keeping the win9x profiles outside the home-share, then he
_must_ not upgrade to 2.0.7 before planning accurately for the change.
Samba team should say what they think of people that will decide they
want to keep profiles out of the home (say thet have  win9x only) and
will use
logon home = \\%L\profiles\%U
intentionally (they don't mind losing net use /home).
Will it be considered a valid/supported choice?
Maybe to keep compatibility with what samba did before 2.0.6? A site
using 2.0.5 and logon_path for win9x could upgrade to 2.0.7/2.0.6 simply
by setting logon_home = logon_path.

== 6) smbclient: various weird things (at least for me)
smbclient does not output anymore the line with
"security=share" or "security=user" or "connected as guest
security=user" after commands as "smbclient '\\srv\shr'" like 1.9.18
I think it was useful.

b) "ls" of an empty dir 
i) 1.9.18 doing "ls" to an empty samba dir:
smb: \> ls
                49550 blocks of size 16384. 33754 blocks available

ii) 2.0.7 doing "ls" to an empty samba dir:
smb: \> ls
ERRDOS - ERRbadfile (File not found.) listing \*
                49550 blocks of size 16384. 33754 blocks available

iii) dir listing compatibility with win9x/nt
When connecting with smbclient to a win share, the . and .. dir are
showed in the top share too, even if .. obviously cannot be cd'ed into.
I know . and .. in the topshare are useless, but if win does this way...
If samba did like win9x/nt do, then the error at point 6) b) ii) would
go away automatically.

c) putting just 1 of 2 dirs.
I have a linux dir with
I cannot find a way to connect to another smb server share and
transferring just the dir1 with the file(s) within.

smb: \> recurse
directory recursion is now on
smb: \> prompt
prompting is now off
smb: \> mask *
smb: \> put dir1
dir1 does not exist
smb: \> mput dir1 (dir1 is transferred without file1, no output)
smb: \> mput dir* (dir1 and dir2 transferred without files, no output)
smb: \> mput *  (dir1 and dir2 transferred with files, output to screen)
putting file dir1/file1 as \dir1\file1 (0.781235 kb/s) (average 0.78125
putting file dir2/file2 as \dir2\file2 (1.46481 kb/s) (average 1.08507
smb: \>

I think "mput dir1" should do it, right?

d)  no output when transferring empty dirs
"put" of empty dirs gives no output to the screen, even if the dirs are
actually transferred, this causes confusion:

smb: \> prompt
prompting is now off
smb: \> mput emptydir
smb: \> recurse
directory recursion is now on
smb: \> mput emptydir
smb: \>

The 2nd mput really transfers the dir, the 1st does not, but the output
is the same for both.

e) "orphan" 0 byte file created
linux dirs:
dir1/file1  (size > 0)
dir2/file2  (size > 0)

smb: \> prompt
prompting is now off
(with or without smb: \> mask *)
smb: \> mput dir1
Error opening local file file1
smb: \>

A zero byte file1 is created on the target share.
If recurse is not set, I think that smbclient should either transfer
nothing or just the top dir or the complete file1.

== 7) browsing behavior: anonymous login
There is a different behavior doing
smbclient -L -U%
if the server is samba or nt

nt wants a correct user/pass pair if guest account is disabled, wants
whatever user (even a wrong one, but it wants it) if guest account is
enabled, example:
smbclient -L nt -U%
never shows the shares
smbclient -L samba -U%
shows the shares

If nt has the guest account you need
smbclient -L nt -Uany_wrong_user%
to get the share

Could  -U% somehow trigger the use of the guest account on an nt

== 8) browsing a w2k-rc2 (NOT A DOMAIN ISSUE)
I cannot get the list of shares from a w2k-rc2 profess. Win9x's see the
I use a valid login/passwd. I can connect to a share with the same
login/pass, though:

$ smbclient -L w2kp -Uuser%pass
shows no shares
$ smbclient '\\w2kp\prova' -Uuser%pass
allows me to connect

== 9) sighup/log reopening logs.
Even if the release notes of 2.0.6 say the issue is solved, this is not
the case for my systems: connections that are already active keep
logging to the old logs; logrotate rotates/zip the logs and samba stops
logging completely till restart.

However, Roger Hayter pointed me to the "copytruncate" option in
              Truncate  the original log file in place after cre-
              ating a copy, instead of moving the  old  log  file
              and  optionally  creating a new one, It can be used
              when some program can not be told to close its log-
              file and thus might continue writing (appending) to
              the previous log file forever.  Note that there  is
              a  very  small  time slice between copying the file
              and truncating it, so some logging  data  might  be
              lost.   When this option is used, the create option
              will have no effect, as the old log file  stays  in

I've been using this for sometime and this solves the samba logs
rotating problem.
I think you could put a note about "copytruncate" as a comment in the
samba.log (logrotate config file) file, so that if someone has problems
he can quickly see one possible solution.
The "copytruncate" option didn't exist in earlier logrotate versions.

This is what I'm using
/var/log/samba/log.nmb {
    /usr/bin/killall -HUP nmbd
/var/log/samba/log.smb {
    /usr/bin/killall -HUP smbd

== 10) smbmount: password length in "ps" output
When a password protected win9x share is mounted, the username and the
length of the password used to mount it are in the ps output.
Could the length of the password be hidden?

== 11) smbmount: weird problem with a weird setup
- someone has and HD (Win9x) where the volume label of the HD is "Xyz"
- there is a dir "c:\Xyz", 
- the c:\ rootdir is shared (say as "c")
Then when the HD is smbmounted the c:\Xyz dir will appear as a file
(really as a "VOLUME ARCHIVE") and not a dir, its content won't be
To solve this either change the volume label or the dir name.
Smbclient in not affected.
This is real-time, if you change the volume label while the disk is
smbmounted you see the dir re-becoming a dir and vice-versa.

== 12) logging: connection attempts with wrong password
samba doesn't log (at standard log level)  the ip address of a machine
from where a user tries to connect with a wrong password, or without
being in "valid users". I'd like to know who is trying to access a
non-public share using every possible password.

== 13) logging: samba domain member
There are two 2.0.7: the 1st is PDC, the other is domain member of the
1st PDC.
Authentication works ok, the domain member has an empty smbpasswd file.
When I connect to my homeshare on the domain member I get

[2000/01/29 17:57:38, 1] smbd/password.c:pass_check_smb(504)
  Couldn't find user 'go' in smb_passwd file.
[2000/01/29 17:57:38, 1] smbd/service.c:make_connection(545)
  notebook ( connect to service go as user go (uid=500,
gid=500) (pid 1900)

I don't understand why it logs that it can't find "go" in smbpasswd
since the primary auth source is the pdc which gives ok to my
userid/password pair. It shouldn't look at the smbpasswd file at all if
the pdc is there online, should it?
All works, but the log says something that could be interpreted
as a problem. I routinely grep the logs for anomalies and these are
false positives.

Well, thanks for reading so far  :-)

Now about linux/samba:
Could one of the SambaTeam members, you who have the "power", ask A.Cox
to include the smbfs-nls patch or a similar thing (to smbmount win9x dir
with accented chars) in the official linux 2.2.x kernel?


giulioo at

More information about the samba-technical mailing list