error in smb

Issues related to applications and software problems and general support
Post Reply
Jonigueh
Posts: 3
Joined: 2021/09/18 17:21:25

error in smb

Post by Jonigueh » 2021/09/18 17:27:37

Best regard. Please I have an error with the SMB of CentOs 8, I do not connect to any Windows 10 computer. attached configuration of the smb.conf file

[global]
workgroup = MYECOLOMBIA
# passdb backend = tdbsam
printing = cups
printcap name = cups
printcap cache time = 750
cups options = raw
# map to guest = Bad User
include = /etc/samba/dhcp.conf
logon path = \\%L\profiles\.msprofile
logon home = \\%L\%U\.9xprofile
logon drive = P:
usershare allow guests = No
add machine script = /usr/sbin/useradd -c Machine -d /var/lib/nobody -s
/bin/false %m$
domain logons = No
domain master = No
security = user
wins support = 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 = @ntadmin root
force group = ntadmin
create mask = 0664
directory mask = 0775


path = /u
browseable = Yes
writeable = Yes
guest ok = Yes
read only = No
directory mask = 0777

BShT
Posts: 583
Joined: 2019/10/09 12:31:40

Re: error in smb

Post by BShT » 2021/09/19 03:32:42

if you security = user

you have to

adduser user

smbpasswd -a user

and i think you mix domain client and non domain confs...

User avatar
TrevorH
Site Admin
Posts: 33191
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: error in smb

Post by TrevorH » 2021/09/19 14:32:26

path = /u
browseable = Yes
writeable = Yes
guest ok = Yes
read only = No
directory mask = 0777
This is missing a share name heading like "[homes]" so it will be either ignored or treated as part of the preceding [print$] section and that is just wrong.

Also, if the path to the share you want to create is really "/u" then it's non-standard and you will need to read the instructions that are in /etc/samba/smb.conf.example to find out how you tell selinux that it's OK for that path to be used.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

pjsr2
Posts: 614
Joined: 2014/03/27 20:11:07

Re: error in smb

Post by pjsr2 » 2021/09/19 15:58:43

Samba comes with a utility called "testparm" to check the validity of your configuration file.
Of course, testparm can only check the syntax, and there are many ways to create a non-functional configuration file that is syntactically correct. So an "OK" from testparm does not guarantee that your config file is perfect. See man testparm.

In your case, the config file is syntactically correct. However, testparm presents the contents in the way it has interpreted it, leaving out all unchanged settings. In that output, it is obvious that testparm concludes that

Code: Select all

path = /u
browseable = Yes
writeable = Yes
guest ok = Yes
read only = No
directory mask = 0777
belongs to the "[print$]" section, and this could have helped you to spot the error. As TrevorH already has pointed out, you are probably missing a "[homes]" heading.

Jonigueh
Posts: 3
Joined: 2021/09/18 17:21:25

error smb

Post by Jonigueh » 2021/09/25 15:43:22

When I try to connect from CentOs 8 to a Windows 10 computer it always asks for a username and password and Domain appears and there is no domain on Windows 10 computers. This is the configuration of my smb.conf file, the / u partition is necessary. So I had it with OpenSuse and everything worked fine, but now that we migrated to CentOs 8 because it was necessary for our software, the connection and the printers do not work.


[global]
workgroup = MYECOLOMBIA
# passdb backend = tdbsam
printing = cups
printcap name = cups
printcap cache time = 750
cups options = raw
# map to guest = Bad User
include = /etc/samba/dhcp.conf
logon path = \\%L\profiles\.msprofile
logon home = \\%L\%U\.9xprofile
logon drive = P:
usershare allow guests = No
add machine script = /usr/sbin/useradd -c Machine -d /var/lib/nobody -s /bin/false %m$
domain logons = No
domain master = No
security = user
wins support = No

[homes]
browseable = No
comment = Home Directories
inherit acls = Yes
read only = No

[home]
comment = Home Directories
path = /home/
valid users = %S, %D%w%S
browseable = Yes
writable = yes
read only = No
inherit acls = Yes

[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 = @ntadmin root
force group = ntadmin
create mask = 0664
directory mask = 0775


path = /u
browseable = Yes
writeable = Yes
guest ok = Yes
read only = No
directory mask = 0777
create mask = 777

User avatar
TrevorH
Site Admin
Posts: 33191
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: error in smb

Post by TrevorH » 2021/09/25 16:54:48

Please don't make duplicate posts. I've merged this one in with the original as you don't appear to have taken any notice of the replies you have received so far.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

Post Reply