HP-UX HB v13.00 Ch-20 - CIFS

HP-UX Handbook Rev 13.00 Page 30 (of 40)
Chapter 20 CIFS
October 29, 2013
# /opt/samba/bin/smbstatus
Samba version 2.2.12
Service uid gid pid machine
----------------------------------------------
trainings rdoelker users 383 fish (15.139.20.64) Tue Apr 1 17:11:23 2003
IPC$ rdoelker users 383 fish (15.139.20.64) Tue Apr 1 10:36:55 2003
So in this example the process for client "fish" is 383.
You would find the process that serves the client by smbstatus and send it a signal using
smbcontrol <pid> debug 10 in order to get directly to debug level 10:
# /opt/samba/bin/smbcontrol 383 debug 10
Troubleshooting the startup:
This helped for troubleshooting problems where the connection is working properly, e.g. a
problem deleting a file. But if you need to debug a client from it’s start, e.g. to see as whom you
are connected. You could turn on full debug (for all clients) or you work with an include-
statement in smb.conf:
[global]
include = /etc/opt/samba/include.%m
additional create for the client (e.g. fish )you want to debug an includefile:
/etc/opt/samba/include.fish
debug level = 10
max log size = 10000
This will cause two 10 Mbyte logs to be created with debug level 10 data stored for client fish as
soon as it connects. This allows to decide if the connection is made by the user you think it is
done.
In any case it is worth to empty the logfile for a client before doing a specific test. This is done
by:
# cat /dev/null > log.fish
Deleting logfile content for all clients without affecting the smbd output could be done by:
# for i in `ls |grep log. `; do cat /dev/null > $i; done
If you move a file the filedescriptor that smbd knows about will move as well and the writing
continues. If you delete the file a running smbd will not direcly write a new one.
Troubleshooting a specific problem:
Lets say an application cannot save a file it has created. It would be good to have logging