I'm running a small home network linux-based server which acts as an internet router, torrent client and file server. I have problems connecting Windows clients to server Samba shares ('user name or password is invalid'). How can I enable logging of all stages of Samba authentication/authorization procedure, such as "client connected", "client provided username ... and password ..." etc. so I can find out what exactly is wrong since I'm sure I'm providing proper username and password?
Asked
Active
Viewed 4.5k times
2 Answers
13
set logging in smb.conf to level 2 or higher, e.g.
log level = 3
watch log files - usually in /var/log/samba/
tail -F /var/log/samba/log.[client-machine-name]
look for "authentication for user" ... and context

Zrin
- 607
- 1
- 6
- 14
-
This will not log authorisation failure : it will log `4: Authorization Success` instead. Possibly, this will also provoque a lot of unwanted messages. – MUY Belgium May 03 '23 at 15:19
0
In my case no logs were written at all but login kept failing.
My config file was not as valid as i'd expected. With sudo testparm
i could see that the samba config wasn't valid at all. A similar output could be seen in the smbd
service's status via sudo systemctl status smbd.service
.

Karsten
- 121
- 2