Do you see more than 1,000 or maybe 10,000 files under /etc/log/samba ?? Well these are log files of each computer that accesses your samba shares every time.So having so many files in the /etc/log/samba is not advisible for two reasons, firstly im sure you wouldnt browse through so many files to check your samba logs, secondly it would sometimes take a hell lot of time to even open that folder containing so many files, it slows down your PC.So here's a small fix which makes sure that you have a single log samba log file which ensures that your /etc/log/samba directory is not filled with log files and also makes it easier to view samba logs.So here's how you fix it:


Step 1: Firstly go ahead and delete all those files since you wouldnt need it.Go to the terminal and type sudo nautilus , the nautilus browser would open.Now browse to /etc/log/samba and delete all the unwanted list of log files.You can leave them as it is incase you need to refer to it later.Its not a must to delete these files
Step 2: Now in the terminal type sudo gedit /etc/samba/smb.conf .Now the smb.conf file would open in TextEditor
Step 3: Now look for the line log file = /var/log/samba/log.%m and ensure that you add a ; before the line.So your line should now look like
; log file = /var/log/samba/log.%m
Step 4: You can also limit the size of the samba log file.I have limited it to 1000 kb .You can change it to whatever value you like . This is how the line looks
max log size = 1000
Step 5: Save the changes you made and close the texteditor
Step 6: Now back in the terminal type sudo /etc/init./samba restart
Step 7: Thats all thats there to it.Now you should have one samba log file which will make it a lot easier to view samba logs!!

0 comments

Post a Comment