LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Samba and the pain of having all your teeth kicked in. (https://www.linuxquestions.org/questions/linux-networking-3/samba-and-the-pain-of-having-all-your-teeth-kicked-in-4175691011/)

dravur 02-23-2021 09:41 AM

Samba and the pain of having all your teeth kicked in.
 
Im back with another Samba issue. Yes, Apparently, I am a glutton for punishment.

Having failed with the earlier Samba issue, I spun up a new Redhat 8 system on Azure. I then found a site on the internet that showed how to set up a basic Samba and I followed it religiously. I have not signed this into Redhat yet as I am just testing this one for samba compatibility before I transfer everything from old server to new.

However, after setting up Samba, i can see the shares, but not access them. the share is /u right off the root and the permissions are set to 777 and owner is set to ccas:ccas which is a user and an smb user.

content of the smb.conf is.

[global]
workgroup = SAMBA
security = user

passdb backend = tdbsam
log file = /var/log/samba/log.%m
log level = 2

printing = cups
printcap name = cups
load printers = yes
cups options = raw

[homes]
comment = Home Directories
valid users = %S, %D%w%S
browseable = 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 = @printadmin root
force group = @printadmin
create mask = 0664
directory mask = 0775

[u]
comment = Linux Directories
path = /u
public = yes
writeable = yes
create mask = 775
directory mask = 775
force create mode = 775
force directory mode = 775
force user = ccas
force group = ccas

The users are added using the smbpasswd -a etc andI can see the /u filesystem yet cannot open it. I also cannot open the home or the user filesystem. It is puzzling.


Here is the log file final chunk

[2021/02/23 15:33:14.348007, 2] ../../source3/smbd/service.c:1131(close_cnum)
b-0936 (ipv4:<IP ADDRESS>:41759) closed connection to service <username>
[2021/02/23 15:33:14.348076, 2] ../../source3/smbd/service.c:1131(close_cnum)
b-0936 (ipv4:<IP ADDRESS>:41759) closed connection to service u
[2021/02/23 15:33:14.348110, 2] ../../source3/smbd/service.c:1131(close_cnum)
b-0936 (ipv4:<IP ADDRESS>:41759) closed connection to service shawn.shipley
[2021/02/23 15:33:29.309439, 1] ../../source3/printing/printer_list.c:234(printer_list_get_last_refresh)
Failed to fetch record!
[2021/02/23 15:33:29.309490, 1] ../../source3/smbd/server_reload.c:64(delete_and_reload_printers)
pcap cache not loaded
[2021/02/23 15:33:31.745862, 1] ../../source3/param/loadparm.c:2495(lp_idmap_range)
idmap range not specified for domain '*'
[2021/02/23 15:33:31.748625, 2] ../../source3/smbd/service.c:851(make_connection_snum)
b-0936 (ipv4:<IP ADDRESS>:33304) connect to service u initially as user ccas (uid=1003, gid=1003) (pid 705605)


B-0936 is my PC name.

Any ideas why it lets me browse to he see the shares, but once there, it doesnt let me into the share? that idmap range up there looks mighty suspicious.

ferrari 02-23-2021 01:12 PM

Quote:

Any ideas why it lets me browse to he see the shares, but once there, it doesn't let me into the share?
Can you be a bit more explicit about what you mean by the above? If possible, show by commands and output.

ferrari 02-23-2021 01:20 PM

Please show
Code:

ls -l /u

dravur 02-23-2021 02:21 PM

2 Attachment(s)
When I try and login into \\tcms-linux and I see my name, the /u file system and homes. When I try and click on the u share, it gives me the message Windows cannot access \\10... etc.

michaelk 02-23-2021 03:36 PM

Are you running selinux? If so did you add the the share?
I believe this is correct.

Code:

setsebool -P samba_export_all_ro=1 samba_export_all_rw=1
getsebool –a | grep samba_export
semanage fcontext –at samba_share_t "/u(/.*)?"
restorecon /u


frankbell 02-23-2021 08:09 PM

This is a shot in the dark, but have you configured smbpasswd?

dravur 02-23-2021 09:27 PM

Micheal, I will give that a shot in the morning.

FFrank. I am kind of a new at this. I was not aware there was anything to set up for smbpasswd.

I did add the users using smbpasswd -a <username>

frankbell 02-23-2021 09:38 PM

Quote:

I did add the users using smbpasswd -a <username>
Are the passwords of the remote usernames and of the usernames on localhost the same? If they are not, smbpasswd will not recognize the remote users.

From the man page:

Quote:

-a

This option specifies that the username following should be added to the local smbpasswd file, with the new password typed (type <Enter> for the old password). This option is ignored if the username following already exists in the smbpasswd file and it is treated like a regular change password command. Note that the default passdb backends require the user to already exist in the system password file (usually /etc/passwd), else the request to add the user will fail.

This option is only available when running smbpasswd as root.
Aside: My samba is a little rusty. Since I no longer have a Windows PC, I don't use it much these days.

Gad 02-24-2021 01:06 AM

Its also been a while since I used Samba, however it appears you can see the share which indicates the service should be running. According to the error it appears to be complaining about permissions.

Are you certain the correct permission have been added to the folder?

Another section that caught my eye was the following:

Quote:

inherit acls = Yes
Worth a shot

dravur 02-24-2021 09:01 AM

Frank, Yes, I made sure that the passwords matched what the windows user is using. The only thing that is different is the domain. Since I am not using a domain on the Linux server, could it be that even though I use the same password, could it be the username stopping me as on the domain it is <domain>\username and on linux, it is just <username>

ferrari 02-24-2021 10:37 AM

If operating in a domain environment, the samba server needs to be set up as such...

https://wiki.samba.org/index.php/Set..._Domain_Member

Gad 02-25-2021 12:38 AM

You may need to authenticate with domain\username or alternatively ip_address\username

dravur 02-25-2021 08:32 AM

Is thgere any way to authenticate without setting up the domain connection? The old system ran fine without a domain connection for years, until it stopped.

Gad 02-25-2021 09:04 AM

You may want to look into setting the workgroup name to WORKGROUP as this is the default for Windows

dravur 02-25-2021 09:15 AM

I changed it to workgroup, but no change in being able to access the shares.


All times are GMT -5. The time now is 09:20 AM.