Problem with Samba
Dear all,
I installed Samba in CentOS 7 and there is error (with Samba) when shutting down the machine. Where to find out the error? |
Quote:
If you use systemctl to stop samba service, do you get any error? |
1 Attachment(s)
Please see error attached to this. Thanks.
|
The problem is actually happening when samba starts but you only see it at shutdown.
The errors indicate that some directives in your smb.conf file are not correct or the smb.conf file itself is corrupted some how. Did you edit the file and if so how? Please post your /etc/samba/smb.conf file but please remove all the comments i.e files that start with a ; or # characters. |
Thanks. Here is the file (there is actual IP or domain instead of ?)
[global] workgroup = SAMBA security = user passdb backend = tdbsam printing = cups printcap name = cups load printers = yes cups options = raw workgroup = ???.?? [homes] comment = Home Directories valid users = %S, %D%w%S browseable = No read only = No inherit acls = Yes unix charset = UTF-8 dos charset = CP932 hosts allow = ?.?.?.? security = smb01 passdb backend = ???? map to guest = Bad User [printers] comment = All Printers path = /var/tmp printable = Yes create mask = 0600 browseable = No [print$] comment = Printer Drivers path = /var/lib/samba/drivers write list = @printadmin root force group = @printadmin create mask = 0664 directory mask = 0775 [Share] path = /home/share# shared directory writable = yes# writable guest ok = yes# guest allowed guest only = yes# guest only create mode = 0777# fully accessed file directory mode = 0777# fully accessed directory |
There are directives specific to the [global] section and ones specific to the [share] section and you can use the testparm utility to verify the syntax of your smb.conf file.
Quote:
min procotol = SMB1 For more information see the samba guide. https://www.samba.org/samba/docs/cur...mb.conf.5.html |
1 Attachment(s)
Here is current file
[global] workgroup = SAMBA security = user passdb backend = tdbsam printing = cups printcap name = cups load printers = yes cups options = raw min procotol = SMB1 # security = smb01 workgroup = ?.? [homes] comment = Home Directories valid users = %S, %D%w%S browseable = No read only = No inherit acls = Yes unix charset = UTF-8 dos charset = CP932 hosts allow = ?.?.?.? passdb backend = ?? map to guest = Bad User [printers] comment = All Printers path = /var/tmp printable = Yes create mask = 0600 browseable = No [print$] comment = Printer Drivers path = /var/lib/samba/drivers write list = @printadmin root force group = @printadmin create mask = 0664 directory mask = 0775 [Share]# any name you like path = /home/share# shared directory writable = yes# writable guest ok = yes# guest allowed guest only = yes# guest only create mode = 0777# fully accessed file directory mode = 0777# fully accessed directory but I still get attached error. |
you did not fix the problem mentioned by michaelk (and stated in the error message you posted)
|
1 Attachment(s)
Here is file
[global] workgroup = SAMBA security = user passdb backend = tdbsam printing = cups printcap name = cups load printers = yes cups options = raw min procotol = SMB1 # security = smb01 workgroup = ?.? inherit acls = Yes unix charset = UTF-8 dos charset = CP932 hosts allow = ?.?.?.* passdb backend = ?? map to guest = Bad User [homes] comment = Home Directories valid users = %S, %D%w%S browseable = No read only = No [printers] comment = All Printers path = /var/tmp printable = Yes create mask = 0600 browseable = No [print$] comment = Printer Drivers path = /var/lib/samba/drivers write list = @printadmin root force group = @printadmin create mask = 0664 directory mask = 0775 [Share]# any name you like path = /home/share# shared directory writable = yes# writable guest ok = yes# guest allowed guest only = yes# guest only create mode = 0777# fully accessed file directory mode = 0777# fully accessed directory and I still have got attached error below. |
you might want to check testparm: https://www.samba.org/samba/docs/cur...estparm.1.html
|
Once you modify the smb.conf file to manually restart samba run the command as root
systemctl start nmb systemctl start smb Quote:
Quote:
|
1 Attachment(s)
Many thanks Michael.
Quote:
Quote:
But I still get attached error. |
Can not see the actual error message
systemctl -l restart smb Or look at the log journalctl -u smb |
1 Attachment(s)
Quote:
|
My fault, I misspelled protocol.
Try: min protocol = SMB1 |
1 Attachment(s)
Quote:
|
I am not sure what the status code means.
Look at /var/log/samba log files and the output of journalctl -xe |
Thanks.
Here are the errors Quote:
|
Dear all,
Any other help? |
Dear PingAn, see post #17. Your daemon could not be started and the reason was most probably written into the log.
|
Can you advise regarding the file below (from /var/log/samba/old)?
Quote:
|
Dear all,
Any other help? |
You never fixed my spelling error
min procotol = SMB1 should be min protocol = SMB1 Quote:
|
Where did you see the wrong spelling (in which file)?
Here is my smb.conf Quote:
|
Ok that error was fixed. Now remove the comments as indicated in my previous post.
|
I've removed all comments within smb.conf file but I've still got the following
Quote:
|
Check the logs.
|
Sorry, which log file do you mean?
|
/var/log/samba
|
Sorry to that log file is empty.
Quote:
|
Check the files in the old directory.
|
Here is log.smbd-20190812
Quote:
Quote:
|
Nothing in the logs since 2019/08/03 and from the provided information it looked like it started ok.
Nothing to really indicate the cause of the problem. Could be permissions. What have you changed in addition to the smb.conf file? |
I did no change other than the adjustment against smb.conf.
|
Samba issue
I was facing error in Samba while installing in my Centos OS. Can you please help me out.
|
John,
Can you raise one other ticket and not to annoy this issue? |
Any other help to the original problem?
|
Try starting smbd in interactive from a terminal window instead of using systemd. That might show errors that are not seen by systemd or written to the log files. As root:
smbd -i |
All times are GMT -5. The time now is 07:37 PM. |