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 |
All times are GMT -5. The time now is 02:20 AM. |