samba output error messages naar console

Pagina: 1
Acties:

  • justice strike
  • Registratie: Juni 2001
  • Laatst online: 09-02 15:49
al utfs & rtfm gebruikt

alle error messages worden gelogged naar de console naast de log files. Dit is zwaar irritant als je bezig bent met emacs oid. Ik heb al geprobeerd om te redirecten door (n)smbd >> logfile te doen en de files aan te maken. Maar dit mocht niet baten. Daarbij heb ik ook geprobeerd met syslogd.conf iets te doen, maar ik weet niet precies hoe die werkt. dus had ik

(n)smbd.* logfile

gedaan maar dan zegt hij dat hij de facility niet kent. Afijn, ik wil dus de console error messages naar een file loggen, of in iedergeval van mijn scherm af hebben en weet niet zo precies hoe dat moet :S heb al gezocht, er zijn meer mensen met het probleem, maar een echte oplossing is er ook niet.

oh ja misschien wel handig om te vermelden dat ik op een freebsd 4.10 werk.

[ Voor 7% gewijzigd door justice strike op 05-09-2004 19:13 ]

U can call me sir.... or justice as long as u bow down ;)


  • igmar
  • Registratie: April 2000
  • Laatst online: 31-01 23:50

igmar

ISO20022

Zie de -S, -d en -l parameters van smbd, en smb.conf syslog en syslog only parameters. Zonder verdere info betreft hoe het geheel is opgezet en de relevante delen van smb.conf valt hier verder weinig over te zeggen.

  • Super_ik
  • Registratie: Maart 2001
  • Laatst online: 18:45

Super_ik

haklust!

draai je wel als demon en niet in debug mode?

8<------------------------------------------------------------------------------------
Als ik zo door ga haal ik m'n dood niet. | ik hou van goeie muziek


  • justice strike
  • Registratie: Juni 2001
  • Laatst online: 09-02 15:49
heb al gekeken naar de debug level, maar zelfs op 0 zetten geeft nog error messages, overigens moeten die messages in de logfile gestopt worden dit had ik al geprobeerde door -l logfile te doen maar dat heeft niet mogen baten. Verder weet ik niet echt wat ik met de -s config optie zou moeten, aangezien hij de smb.conf wel pakt.

standaard samba.sh.sample bestand

de sample heb ik maar op een plek veranderd, dit om de error messages in een file te krijgen ipv het scherm:

$smbd -D -l /var/log >> /var/log/smbd.log
$nmbd -D -l /var/log >> /var/log/nmbd.log

(ziet er een beetje dubbelop uit maar het werkt beiden niet :S

smb.conf ziet er zo uit

[global]
workgroup = AMEN-TI
netbios name = OSIRIS
server string = Osiris main file server
interfaces = 192.168.2.1
security = SHARE
encrypt passwords = Yes
unix password sync = Yes
log level = 2
log file = /var/log/samba/samba.%m
max log size = 250
time server = Yes
os level = 64
wins support = Yes
lock dir = /usr/local/locks

(relevant dacht ik :))

[ Voor 43% gewijzigd door justice strike op 06-09-2004 13:36 ]

U can call me sir.... or justice as long as u bow down ;)


  • cool_zero
  • Registratie: Juni 2001
  • Laatst online: 25-10-2022
Heb je alleen logs van samba op je console? Lijkt me meer op een probleem met je syslog. In samba kun je de regel "syslog = 0" toevoegen, maar dat lost het probleem nog niet compleet op. Om syslog niet op het scherm te krijgen moet je /etc/syslog aanpassen.

  • justice strike
  • Registratie: Juni 2001
  • Laatst online: 09-02 15:49
ansich heb ik vanaf een verse install van freebsd niets veranderd aan de syslog.conf file. Ik zou niet weten wat er verkeerd zou moeten zijn.


# $FreeBSD: src/etc/syslog.conf,v 1.13.2.4 2003/05/12 13:59:23 yar Exp $
#
# Spaces ARE valid field separators in this file. However,
# other *nix-like systems still insist on using tabs as field
# separators. If you are sharing this file between systems, you
# may want to use only tabs as field separators here.
# Consult the syslog.conf(5) manpage.
*.err;kern.debug;auth.notice;mail.crit /dev/console
*.notice;authpriv.none;kern.debug;lpr.info;mail.crit;news.err /var/log/messages
security.* /var/log/security
auth.info;authpriv.info /var/log/auth.log
mail.info /var/log/maillog
lpr.info /var/log/lpd-errs
cron.* /var/log/cron
*.emerg *
# uncomment this to log all writes to /dev/console to /var/log/console.log
#console.info /var/log/console.log
# uncomment this to enable logging of all log messages to /var/log/all.log
# touch /var/log/all.log and chmod it to mode 600 before it will work
#*.* /var/log/all.log
# uncomment this to enable logging to a remote loghost named loghost
#*.* @loghost
# uncomment these if you're running inn
# news.crit /var/log/news/news.crit
# news.err /var/log/news/news.err
# news.notice /var/log/news/news.notice
!startslip
*.* /var/log/slip.log
!ppp
*.* /var/log/ppp.log

U can call me sir.... or justice as long as u bow down ;)


  • cool_zero
  • Registratie: Juni 2001
  • Laatst online: 25-10-2022
Als dat syslog=0 in je smb.conf niet genoeg helpt kun je dus deze regel:
code:
1
*.err;kern.debug;auth.notice;mail.crit /dev/console

uit je syslog.conf aanpassen (b.v. naar een file log file inplaats van naar /dev/console) En aan de syslog.conf is niets verkeerd, want loggen op het scherm komt wel vaker voor, alleen je wilt het dus niet :P

  • justice strike
  • Registratie: Juni 2001
  • Laatst online: 09-02 15:49
ik denk dat het nu wel goed loopt met syslog = 0 (kan "no" ook eigenlijk?)

opzich is het niet erg om kritische error logs op je scherm te krijgen, maar samba print wel zodanig veel dat het niet nuttig is om het op je scherm te zien.

daarbij wordt het scherm niet of nauwelijks bekeken en heeft het dus verder geen nut.

U can call me sir.... or justice as long as u bow down ;)


  • cool_zero
  • Registratie: Juni 2001
  • Laatst online: 25-10-2022
volgens de 'man smb.conf' kan 'no' niet bij syslog:
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
       syslog (G)
              This  parameter  maps  how  Samba debug messages are logged onto the system
              syslog logging levels. Samba debug level zero  maps  onto  syslog  LOG_ERR,
              debug   level  one  maps  onto  LOG_WARNING,  debug  level  two  maps  onto
              LOG_NOTICE, debug level three maps onto LOG_INFO.  All  higher  levels  are
              mapped to  LOG_DEBUG.
 
              This parameter sets the threshold for sending messages to syslog. Only mes-
              sages with debug level less than this value will be sent to syslog.
 
              Default: syslog = 1
 
       syslog only (G)
              If this parameter is set then Samba debug messages are logged into the sys-
              tem syslog only, and not to the debug log files.
 
              Default: syslog only = no


Maar dat had je zelf ook op kunnen zoeken :P
Pagina: 1