LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 02-23-2021, 09:41 AM   #1
dravur
LQ Newbie
 
Registered: Feb 2021
Posts: 22

Rep: Reputation: Disabled
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.
 
Old 02-23-2021, 01:12 PM   #2
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,842

Rep: Reputation: 1148Reputation: 1148Reputation: 1148Reputation: 1148Reputation: 1148Reputation: 1148Reputation: 1148Reputation: 1148Reputation: 1148
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.
 
Old 02-23-2021, 01:20 PM   #3
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,842

Rep: Reputation: 1148Reputation: 1148Reputation: 1148Reputation: 1148Reputation: 1148Reputation: 1148Reputation: 1148Reputation: 1148Reputation: 1148
Please show
Code:
ls -l /u
 
Old 02-23-2021, 02:21 PM   #4
dravur
LQ Newbie
 
Registered: Feb 2021
Posts: 22

Original Poster
Rep: Reputation: Disabled
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.
Attached Thumbnails
Click image for larger version

Name:	INTERNAL - SAMBA issue 2 022321.PNG
Views:	45
Size:	14.3 KB
ID:	35704   Click image for larger version

Name:	INTERNAL - Samba issue 3 022321.PNG
Views:	13
Size:	4.2 KB
ID:	35705  
 
Old 02-23-2021, 03:36 PM   #5
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,784

Rep: Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937
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
 
Old 02-23-2021, 08:09 PM   #6
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,385
Blog Entries: 28

Rep: Reputation: 6164Reputation: 6164Reputation: 6164Reputation: 6164Reputation: 6164Reputation: 6164Reputation: 6164Reputation: 6164Reputation: 6164Reputation: 6164Reputation: 6164
This is a shot in the dark, but have you configured smbpasswd?
 
Old 02-23-2021, 09:27 PM   #7
dravur
LQ Newbie
 
Registered: Feb 2021
Posts: 22

Original Poster
Rep: Reputation: Disabled
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>
 
Old 02-23-2021, 09:38 PM   #8
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,385
Blog Entries: 28

Rep: Reputation: 6164Reputation: 6164Reputation: 6164Reputation: 6164Reputation: 6164Reputation: 6164Reputation: 6164Reputation: 6164Reputation: 6164Reputation: 6164Reputation: 6164
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.

Last edited by frankbell; 02-23-2021 at 09:40 PM.
 
Old 02-24-2021, 01:06 AM   #9
Gad
Member
 
Registered: May 2013
Distribution: FreeBSD
Posts: 566

Rep: Reputation: 114Reputation: 114
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
 
Old 02-24-2021, 09:01 AM   #10
dravur
LQ Newbie
 
Registered: Feb 2021
Posts: 22

Original Poster
Rep: Reputation: Disabled
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>
 
Old 02-24-2021, 10:37 AM   #11
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,842

Rep: Reputation: 1148Reputation: 1148Reputation: 1148Reputation: 1148Reputation: 1148Reputation: 1148Reputation: 1148Reputation: 1148Reputation: 1148
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
 
Old 02-25-2021, 12:38 AM   #12
Gad
Member
 
Registered: May 2013
Distribution: FreeBSD
Posts: 566

Rep: Reputation: 114Reputation: 114
You may need to authenticate with domain\username or alternatively ip_address\username
 
Old 02-25-2021, 08:32 AM   #13
dravur
LQ Newbie
 
Registered: Feb 2021
Posts: 22

Original Poster
Rep: Reputation: Disabled
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.
 
Old 02-25-2021, 09:04 AM   #14
Gad
Member
 
Registered: May 2013
Distribution: FreeBSD
Posts: 566

Rep: Reputation: 114Reputation: 114
You may want to look into setting the workgroup name to WORKGROUP as this is the default for Windows
 
Old 02-25-2021, 09:15 AM   #15
dravur
LQ Newbie
 
Registered: Feb 2021
Posts: 22

Original Poster
Rep: Reputation: Disabled
I changed it to workgroup, but no change in being able to access the shares.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Sync your teeth into power browser Vivaldi's largest update so far LXer Syndicated Linux News 0 09-29-2018 07:35 AM
18.04 - the screen froze and kicked me out, upon login Im kicked back out wadesmart Ubuntu 2 07-11-2018 07:38 AM
SCSI Drive Labels and Lilo (w/ wailing and gnashing of teeth) enorbet Slackware 6 01-17-2014 04:12 PM
.xinitrc, much wailing and gnashing of teeth Berto Linux - Software 3 08-22-2004 05:11 AM
oh the pain, the pain of c bobthebat Programming 2 07-04-2002 11:30 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 08:11 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration