Samba Log Files

Hoping someone can help me.

SuSE 11.2 complete with all current updates.

Having setup / configured Samba with UserName and PassWord protection that works a treat from a WinXP box i find that there are no access / error logs being created.

What do i have add the the smb.conf file to auto create access and error logs?

Mark

On Wed December 16 2009 05:46 pm, akwe-xavante wrote:

>
> Hoping someone can help me.
>
> SuSE 11.2 complete with all current updates.
>
> Having setup / configured Samba with UserName and PassWord protection
> that works a treat from a WinXP box i find that there are no access /
> error logs being created.
>
> What do i have add the the smb.conf file to auto create access and
> error logs?
>
> Mark
>
>
Mark;

It depends a bit on how much info you need. By default, smbd creates the log
files in /var/log/samba/log.smbd The default log level will not give you a
lot of information but you can alter this with the “log level” parameter in
the Global section of /etc/samba/smb.conf.

Here are a few examples:


log level = 1 auth:3
log level = 3

The default is 0. I would suggest you start with the first, it should log
most errors with lots of information about authentication. Reduce the log
level for less information and increase for more information. You can also
generate audit files on a per share basis. Post back if you need help with
audits. You can find more information on parameters in:
man smb.conf.


P. V.
“We’re all in this together, I’m pulling for you.” Red Green

Hi,

Thank you for your reply.

My Config file reads:

[global]
log level=0
log file= /var/log/samba/log.%m
workgroup=WORKGROUP
printing=cups
printcap cache time=750
printcap name = cups
cups options = raw
include = /etc/samba/dhcp.conf
#logon path = \%25L\profiles.msprofile
#logon home = \%25L%25U.9xprofile
#logon drive = P:
restrict anonymous = yes
domain master = no
passdb backend = smbpasswd
server string = Samba Server
netbios name = Samba
name resolve order=bcast host lmhosts wins

[printers]
comment = All Printers
path = /var/tmp
printable = Yes
create mask = 0600
browseable = No

[SambaServer]
force user = ???
read only = no
path = /???/???/

But no log file is being created, i’ve allso noticed that apache’s log files are not getting created either.

Mark

Do you have one of syslog, syslog-ng or rsyslog running? If not, no logs.

On Thu December 17 2009 06:26 am, akwe-xavante wrote:

>
> Hi,
>
> Thank you for your reply.
>
> My Config file reads:
>
> [global]
> log level=0
> log file= /var/log/samba/log.%m
> workgroup=WORKGROUP
> printing=cups
> printcap cache time=750
> printcap name = cups
> cups options = raw
> include = /etc/samba/dhcp.conf
> #logon path = \%25L\profiles.msprofile
> #logon home = \%25L%25U.9xprofile
> #logon drive = P:
> restrict anonymous = yes
> domain master = no
> passdb backend = smbpasswd
> server string = Samba Server
> netbios name = Samba
> name resolve order=bcast host lmhosts wins
>
> [printers]
> comment = All Printers
> path = /var/tmp
> printable = Yes
> create mask = 0600
> browseable = No
>
> [SambaServer]
> force user = ???
> read only = no
> path = /???/???/
>
> But no log file is being created, i’ve allso noticed that apache’s log
> files are not getting created either.
>
> Mark
>
>
Mark;
Given your smb.conf, there will be separate logs for each machine
in /var/log/samba. Each log will have the a name of the
form “log.<machinename>”. The default “log level” is 0, which you also
assigned, and generates very little in the logs. To get more information you
need to increase the “log level” as in my earlier post. See also the post by
ken yap, particularly if other applications are not generating logs.

P. V.
“We’re all in this together, I’m pulling for you.” Red Green

Hi,

Thank you all for your replies.

All are running inc syslog, but no logs are being created for apache2, vsftpd, ssh or samba.

changed log level to 3.

linux-u32e:/etc/samba # rcvsftpd status
Checking for service vsftpd running
linux-u32e:/etc/samba # rcapache2 status
Checking for httpd2: running
linux-u32e:/etc/samba # rcnmb status
Checking for Samba NMB daemon running
linux-u32e:/etc/samba # rcsmb status
Checking for Samba SMB daemon running
linux-u32e:/etc/samba # rcsyslog status
Checking for service syslog: running
linux-u32e:/etc/samba #

Mark

On Thu December 17 2009 05:06 pm, akwe-xavante wrote:

>
> Hi,
>
> Thank you all for your replies.
>
> All are running inc syslog, but no logs are being created for apache2,
> vsftpd, ssh or samba.
>
> changed log level to 3.
>
<snip>
>
> Mark
>
Mark;

Did you restart smbd after editing /etc/samba/smb.conf ?


P. V.
“We’re all in this together, I’m pulling for you.” Red Green

Apache doesn’t go through syslog. I think Samba might not either. vsftpd and sshd normally do. In any case no logs at all is not a good symptom.

Hi,

Both nmb and smb were / are restarted.

I’m still not getting any logs recorded but all deamons / servers are running without any problems though!

Can anybody else help.

From past experience with apache2 if logs cannot be written then the apache server will not start!!

Is this still true or am i missing something?

Mark

I think i’ve sort of sorted it!

My logs do exist!

When using Dolphin to browse my files i see nothing in:

/var/log/samba/
/var/log/apache2/

etc

even when i select to show hidden files these directories are empty!

When i use a Console Terminal to look for the log files they exist!?

my vsftpd log is present using Dolphin but when click to open it the log file is opened with Kwite and is empty but it is 48kb in size i now notice. when i open it from the console terminal i get my log file complete with all its entries.

How do i get Dolphin to display my log files in future?

How do i get Dolphin to display the contents of those log files when i click to open these log files?

Mark