Working with SMB shares and SMB shared printers

The biggest issues with OM seem to be working with anything involving SMB shares and SMB shared printers, which I use extensively. I am going to try a support post, but if it requires a lot of work to get going, then this might not be for me. Basic functionality needs to be basic for me. I should not have to work hard to use SMB shares so I am probably missing something simple.

I should not have to edit multiple text files for something so basic so I think my brain is trying to overcomplicate it or something.

The problem I am having is, when I am talking about software online, I am not making money for my family. This is prolonging my pain because I only have an hour or two at a time to learn these things. Those hours mean sacrificing my small bit of personal free time. I don’t have much of a choice so I will have to power through it. I am not enjoying the process. I don’t know how so many people have time for this stuff in their lives constantly.

Some people seem to have been able to get shares working here:

That thread suggests that the issue was resolved.
The author of DnfDrake recommended installing samba-server.

1 Like

Thanks, will check it out. I am sure there is a solution out there somewhere.

I just use SSH and IPP instead of SMB. If you need Windows clients to connect to Linux via the OpenSSH feature, just use SCP unless you are in an ADDS domain. IPP is also widely used for both, unless your printer is not a network printer. Even then, I think CUPS will still let you share it as IPP.

2 Likes

I don’t know but maybe SMB shares in OMLx may need some work. The contributor group is small and I don’t recall any contributor using SMB. If users post about this I am sure OM devs will work on anything that needs sorting or shoring up. We want OMLx to work for business users. In Texas you might say that “We want that dog to hunt!”

Rock is the normal choice for business users.

Our users keep us on our toes so to speak.

1 Like

I don’t print or use windows, but for file shares I have NFS setup on my server.

1 Like

I did try at one point, but the smb.conf would not work. It all depends on what the goal is and the user should probably decide how best to create SMB shares if they choose to use that. It’s not a set-and-forget kind of thing as it can cause security issues if not configured properly.

1 Like

I managed to get SMB working for file and folder sharing on two ASUS laptops, a K55A and an X555-UA. I even got it to share with iOS18.x, which is a real accomplishment because iOS18.x is notorious for not working with SMB.

But what do I know? I am just a retired truck driver who likes to mess with this stuff. But I do know west Texas from West, Texas.

Anyway, you will need to edit your /etc/samba/smb.conf file with your favorite text editor. Be certain to make a backup copy first.

Inside smb.conf you will need to add the following:

[global]
#every line starting with a ‘#’ is a comment. You can leave out the comment lines at your discretion.
#iOS requires SMB2 at minimum. OM seems to always try using SMB1 first. Not sure what happens with Android / Windows / macOS. I don’t have those for testing.
min protocol = SMB2

#still under [global]
#replace x.x.x.0/24 with your local IP network and /24 with your appropriate subnet mask. 127.0.0.1 is your local loop back. I hope I explained this properly. This line should be there, but with a ‘#’ in front of it and a bogus IP network or two.
hosts allow = x.x.x.0/24 127.0.0.1

#more lines under [global]
#For ios18. If you don’t have an iPad/iPhone, you can leave out these lines. Unless there is a MacBook in the house. Then you may need these. It took two root canals and a backhoe to find these on the Internet. Apple support for SMB is bad. Horrible.
vfs objects = fruit streams_xattr
fruit:metadata = stream
fruit:model = MacSamba
fruit:veto_appledouble = no
fruit:nfs_aces = no
fruit:wipe_intentionally_left_blank_rfork = yes
fruit:delete_empty_adfiles = yes
fruit:posix_rename = yes
ea support = yes
#iOS18 is quite wonky, isn’t it? Why doesn’t iPadOS17 require this insanity?
#If you have iOS18, you will need a third party app to handle SMB. Apple’s is broken, and they seem to believe the problem is on my end.

#Here is the good stuff, where it gets really messy, really fast. I put these at the end of the smb.conf file. Not sure if at the end is required, but this section is the part that shares the folder. You will need to add these lines for SMB sharing to function properly.

#My_Shares, or whatever name you choose to use to share your folder.
[My_Shares]
path = /media/name_of_folder_containing_My_Shares
#I am sharing an external drive attached to the USB port. Set your path accordingly.
browsable = yes
create mask = 0666
force create mode = 0666
directory mask = 2777
force directory mode = 2777
read only = no
writable = yes
valid users = username(s)

#That is for the first shared folder. Just keep creating more sections below this, changing [My_Shares] and the path = lines to what you require for additional shares. Change read only = no and writable = yes to your requirements.
#

End of /etc/samba/smb.conf edits.

I was never able to make the trash work over SMB. When deleting something over SMB, it is gone for good. Perhaps someone else knows more than myself.

I was never able to get SMB sharing to work quite right when setting it up inside Dolphin. It would be nice if it was possible. The dialog boxes are there to use. I suspect Plasma 6 needs a bit more fine-tuning. It can’t be OM, because /etc/samba/smb.conf works.

Now for sharing an SMB printer, I wish I could help you, but I never successfully shared a printer using SMB. Perhaps someone else knows how.

To start SMB, you will need to go into the terminal:

systemctl enable smb

To restart SMB. Need to do every time /etc/samba/smb.conf is changed:

systemctl restart smb

The current running status of SMB:

systemctl status smb

I hope this helps.

As for using SSH, IPP, NFS, or other solutions, I wish I knew those. I didn’t post this to invalidate those solutions, as I am certain they are quite valid.

1 Like

Well, none of that was very encouraging.

Most of my shares are from an Unraid server so I can switch to using NFS shares instead, I would just need to learn how to use them properly.

I have a printer hooked up to what is going to be the only Windows computer. It is not a network printer. If there is a better way to share 1 laser printer and 2 thermal label printers with 4 Linux PCs, 2 laptops and 1 Windows PC then I am all ears.

I need to figure out what IPP is because this sounds like a possible alternative. I will have to look into it because I have no idea what it means.

IPP stands for Internet Printing Protocol.

https://www.pwg.org/ipp/ippguide.html

There is a driverless technology now called IPPEverywhere

https://www.pwg.org/ipp/everywhere.html

1 Like

I usually prefer a network printer outright but if you must share it the cups ipp is 10x easier most of the time.

That said if you are going to use samba I have found on the windows clients the best thing is to NEVER and I mean NEVER use any of the built in windows garbage to attach to a share. HARDCODE EVERYTHING.

Do not browse to the machine via file explorer. Open file explorer and in the address bar put
\\host_ip_address\sharename

Then mount it permanently. You might also need to create a samba user (this is separate from a system user). smbpasswd -a clientname

1 Like

Thanks for that. I will attempt to make it work this weekend after I do the lawn work as I don’t think the SMB route is going to work in this case.

If I have to buy a new printer it is not the end of the world. This old Samsung ML-2525 has been a trusty workhorse for me since 2009. I am a bit nostalgic about it as it was one of the first pieces of equipment I purchased specifically for my business. It has printed thousands of packing slips for me!

As to the SMB network shares:

I am able to mount them with an fstab Entry:

“//server/share /mnt/sambashare cifs username=,password=,uid=1001,_netdev 0 0”

However, I have to use “mount -a” to get them to actually mount. Once mounted in this way, they work fine. I just don’t understand why they don’t mount at startup.

In you guys opinion, should I just use NFS instead or is there just some piece I am missing with the SMB?

Unraid allows me to share them as both at the same time so it should not be too much of a hardship to use NFS instead.

You should use autofs to mount samba shares at boot not fstab.
/etc/auto.smb.shares

/mnt/DRIVE_M -fstype=cifs,rw,username=sambausername,password=sambapassword,noperm,dir_mode=0777,file_mode=0777 ://192.168.1.126/mdrive

This will keep a failed mount from preventing bootup.

1 Like

As far as printing goes this should help:

also this:
https://support.hp.com/hk-en/drivers/samsung-ml-2525-laser-printer-series/model/19134758

At the very least it will tell you if your printer should work. Regardless, just like in windoze, you may have to install drivers - and fiddle with them. On my Ricoh the default wouldn’t print color. As soon as I told cups to connect over ipp printer worked flawlessly.

If cups is installed on your machine you can read it here: http://localhost:631

1 Like

Resources I used for NFS back in the day:

https://help.ubuntu.com/community/SettingUpNFSHowTo

https://wiki.archlinux.org/title/NFS

https://wiki.archlinux.org/title/Genfstab

Samba I purposefully haven’t needed to play with since I switched to tux, but this might help too:

https://wiki.archlinux.org/title/Samba

1 Like

Thanks, I have the drivers, but they the installer seems broken AF. I am going to tinker with it one last time this weekend before I just throw in the towel on this old guy. It would be much simpler if I could use only 1 PC and just plug it in via USB, but my operation has grown past that point so I might have to pry open my wallet with a crowbar and upgrade the hardware. I HATE spending money and get attached to my hardware over time so upgrading is a last resort for me LOL.

I am leaning towards buying a new Brother network printer that seems to have full Linux and Windows support. It’s only like $130 because I don’t need color printing. That can be my printer for the next 15 years hopefully.

I will update this thread when I get a resolution.

Be sure to check that the printer doesn’t lock you in with an online subscription requirement. A LOT of the HP firmware seems to require it nowadays. Not sure about Brother though - been too long since I bought a consumer printer.

1 Like

For sure! Brother was suggested on other sites as working well with Linux. I do not buy anything HP, they are the worst about this. Brother has a subscription, but it seems to be optional currently. I could block it from updating firmware I guess to keep it from happening in the future.

I only use it to print packing slips and the occasional documents to sign so a big fancy commercial machine is serious overkill.

I could also just buy one of those little usb print server attachments, but that will not help any driver issues for this old machine.