Jump to content
Hedon James

Debian Samba

Recommended Posts

Hedon James
Posted (edited)

oh boy....more hard learnings coming my way, i think!

 

Having solved my Virt-manager VM issues (nuked apparmor from Debian Buster), I needed to install my printer as a "network" printer, rather than redirect a USB device.  I realize that my network settings (smb.conf) are different between Debian and (not yet converted) Lubuntu machines.  They don't see each other over samba, even though they're all part of the same "Workgroup" (which I keep as Workgroup for ease of connecting with virtual Windows shares, and vice verse).  More importantly, Win10 doesn't see "shared printer", so I can't located the shared network printer and add to my Windows printer list.  Obviously, I need to "share" my printer in Debian, correct?

 

So I look for the GUI I've always used before, system-config-samba, but apparently this is an Ubuntu-only tool.  I can only find gadmin-samba in Debian repos, so install that.  Complicated looking beast, but find the tab to add shares and proceed to enter what I think is needed for sharing, but the GUI seems buggy; I get frustrated and close out the GUI without saving anything, or so I think.  But later in the evening when I restart my system, SDDM no longer shows my username login, but some weird linuxy-looking logins....PANIC.  But I see the "other users" icon, and am able to type in my username and password to login.  So I can get in, but the WTH would cause gadmin-samba to modify my SDDM login?

 

I continue to attempt to figure out samba issues (why don't my machines "see" each other, and how do I share my printer?) and I note that my "network" icons have changed in PCManFM-QT.  This is what they used to look like:

image.thumb.png.4a48a1ff1d4c7e66007b150e63db4c75.png

 

But this is what it looks like after I did whatever I've done to bugger it up:

image.png.6957cec27a41c90367af6433a23ba5a4.png

When I right-click the file properties, the permissions and owners are all identical, and the names are correct, but they show differently now.  Of similar concern, when viewing "computer" location in file manager, the root drive used to be called "File System".  Now, it's called "root.link".  But if I check the file properties of root.link, they're identical to "File System".  It appears I've done something innocuous and stupid to effect these changes, but any idea WTH is going on here?

 

Googling seems to suggest that gadmin-samba should NOT be used to configure samba shares, for numerous reasons cited by users.  (I wish I had known that before, as system-config-samba was so simple in Ubuntu land)  So at the recommendation of other's solved situations, I uninstalled gadmin-samba and purged gadmin-samba.  There was a directory with contents that couldn't be deleted, so I manually removed the /etc/gadmin-samba directory.  I also restored my original /etc/samba directory, including smb.conf.  I've restarted samba with

sudo systemctl restart smbd

and

sudo systemctl restart nmbd

but the unusual network locations and "root.link" remain unchanged.  I've stopped & restarted pcmanfm-qt, thinking a fresh restart would pick up the changes.  But nothing has changed.  Still showing 2nd screen weirdness.

 

So obviously my FIRST order of business is to restore to original samba config (which I think I've done?), restore PCManFM-QT display, and restore SDDM login credentials (I've copied over previous sddm.conf file also).  But honestly, I'm afraid to reboot, or even logout/login, as I'm worried about "losing my machine" when I have 2 critical deadlines this week.  Any thoughts on this?  Am I worried for nothing, and perhaps a reboot is exactly what is needed to restore things to their prior order & condition?

 

And my 2nd order of business is to learn how to create shared printer (and files) in Debian.  And why don't any of my 3 Debian machines "see" any other machines than themselves on the network?  I can use pcmanfm to smb://machine-name to the location, and bookmark it, but can't browse to it on the network.  Lubuntu samba allows me to browse.  Is this another "Ubuntu patch" for user-friendliness?  Or do I just have something configured differently?

Edited by Hedon James

Share this post


Link to post
Share on other sites
securitybreach
1 hour ago, raymac46 said:

I haven't fooled around with Samba though.

 

Same, I just use sshfs (scp) or rsync to transfer files.

Share this post


Link to post
Share on other sites
Hedon James

Further googling suggests that MAYBE I enabled samba for "root"?  Not sure that I did.  If I did, certainly not sure how.  Since I'm not exactly sure what gadmin-samba did, I'm not sure how to "fix".  All I can think of is "purge the offender" and "restore the original configs."

 

Paging Sunrat?  Where y'at buddy?  What would you recommend a novice Debian user do?

Share this post


Link to post
Share on other sites
sunrat
9 hours ago, Hedon James said:

Paging Sunrat?  Where y'at buddy?  What would you recommend a novice Debian user do?

 

All I know about Samba is it is some kind of exotic dance.

I use KDE Connect for making my devices talk to each other, and whatever mystical voodoo Syncthing uses. It all works though.

 

Share this post


Link to post
Share on other sites
Hedon James
37 minutes ago, sunrat said:

 

All I know about Samba is it is some kind of exotic dance.

I use KDE Connect for making my devices talk to each other, and whatever mystical voodoo Syncthing uses. It all works though.

 

 

That's funny!  so unhelpful...but funny!  😆

Share this post


Link to post
Share on other sites
Hedon James

Update:

 

- purged gadmin-samba and restored old config files for sddm.conf and smb.conf.  Having successfully met my work due dates, held my breath and rebooted system.  SDDM displays correctly again (phew!) so I dodged that bullet.  And I can navigate to other machines from within PCManFM-QT using the location path smb://machine-name/ and then entering user credentials when prompted.  And I can navigate TO this machine, FROM other machines on the network, using same method.  This is new behavior, so I'd say the primary functionality is fixed.

 

- however, issue with PCManFM-QT display still remains.  Referencing screenshots above, the icons in file manager are labeled incorrectly (see above), and I still can't "browse" the network, as other network machines aren't visible, even though I can navigate to and connect using smb:/// location.  At this point, I think it's 2 separate issues, perhaps bugs.  1st is that I think I have "root" enabled as a samba share, which caused my icons to get re-labeled.  This is a minor concern, as I don't want network users to have access to samba "root" share.  But not sure if that's default, or if I did that, or HOW I did that?  But if I can address that, I'll bet my icons return to their proper labels.  2nd icon is the inability to "browse" network shares from within File Manager.  I've encountered this before with Lubuntu and PCManFM.  Not sure how I fixed that.  Maybe it fixed itself with updates/patches over time?

 

So I'd say everything is working again, and as it should.  But I know me....I'm a tweaker....and I'll continue to look into ways to address the issues described until I'm satisfied it's "correct."  While it's no longer urgent, if anyone has thoughts/suggestions how to investigate or address either issue, I'm happy to hear them.  Otherwise, thanks!

  • Like 2

Share this post


Link to post
Share on other sites
securitybreach

Well at least you resolved some of your issues.

Share this post


Link to post
Share on other sites
sunrat
6 hours ago, Hedon James said:

....I'm a tweaker....and I'll continue to look into ways to address the issues described until I'm satisfied it's "correct."

 

I think we all fall into that category. Keep fixing it until it's broken. Fix it again. Rinse. Repeat. 😆

Share this post


Link to post
Share on other sites
Hedon James
1 hour ago, sunrat said:

 

I think we all fall into that category. Keep fixing it until it's broken. Fix it again. Rinse. Repeat. 😆

 

Yep!  And THAT is why we are all friends here!  😎

Share this post


Link to post
Share on other sites
securitybreach

Just remember to backup configs before heavily modifying them. A simple

cp config config-bk

Share this post


Link to post
Share on other sites
securitybreach

Unless you're a sadist. B)

Share this post


Link to post
Share on other sites
Hedon James
13 hours ago, securitybreach said:

Just remember to backup configs before heavily modifying them. A simple

cp config config-bk

 

ALWAYS!  well....almost always...and thanks for the reminder.  It certainly bears repeating!

  • +1 1

Share this post


Link to post
Share on other sites
raymac46

I'd be interested in seeing how you get this worked out - not that I know much about Samba. 

I am not sure I totally understand your network. I assume it's a Linux one primarily with a Windows 10 VM on one of the machines. I don't know if your printer is on a network or wired in.

Personally I have never tried to print stuff from a VM. No need really as I have both Linux and Windows running on the rails.

  • +1 1

Share this post


Link to post
Share on other sites
Hedon James
Posted (edited)
23 hours ago, raymac46 said:

I'd be interested in seeing how you get this worked out - not that I know much about Samba. 

I am not sure I totally understand your network. I assume it's a Linux one primarily with a Windows 10 VM on one of the machines. I don't know if your printer is on a network or wired in.

Personally I have never tried to print stuff from a VM. No need really as I have both Linux and Windows running on the rails.

 

You're right on Ray.  All machines are Linux, including my main machine, my laptop, a media server, a studio/recording computer, 2 kodi boxes, and 2 Rokus.  The main machine has Windows VMs.  I need the Windows VM because I must use some proprietary real estate software for my commercial appraisal business.  I replaced MOST software with FOSS alternatives, but there are some remaining that I just can't replace.  It's a PITA, but it is what it is.

 

When I was using VirtualBox, Windows could "see" the network and the network could "see" Windows-VM as a machine.  This allowed Windows-VM to "see" my shared printer on my host machine and add it as a network printer.  This was a nice & clean setup that meant I didn't have to "capture" or "redirect" the usb printer to the VM.  In Virt-Manager, I now have to redirect the usb printer to use it, but I'd like to figure out how to add my host printer as a network printer, just like before.  But since my VM can't "see" the network, or vice verse, there's no network printer available to add.  I need to determine if this is a Virt-Manager/Qemu issue regarding networking, or if its samba.

 

Perhaps a little of both.  I setup my VMs using qemu://session (user) rather than qemu://system (root), which limits some networking functions, or so I've read.  That might be my problem.  I might need to setup my VMs as qemu://system and get root permissions and full network functionality, but then root owns the disk image and throws errors on rsync backups.  Alternatively, I've read a user VM can setup a virtual bridge network, but this is over my head so far.  And it might not be my issue.  Still to be determined.

 

Alternatively, it could be samba issue with Debian.  All my machines still running Lubuntu "see" each other just fine browsing the network.  Debian machines only "see" themselves, although I can still connect to those invisible machines by navigation to smb://machine-name in my browser.  So samba seems to be working, just not displaying as network machines in browser.  So this COULD be a samba issue.  It could also be a PCManFM-QT issue.  And further reading indicates it may be an avahi (network discovery) issue, and that dnssd is somehow involved.  avahi and dnssd are both new acronyms to me.  it's all above my head, so anything I learn is hard-won knowledge.

 

But in the meantime, everything seems to be working, so the urgency factor has been dialed down.  It ain't "pretty" but its working, and I've always been a "function over form" person.  Not that form doesn't matter, but who cares what something looks like when it doesn't even work?  LOL!  It's functioning, but now that it's functioning, I'd like to look into form.  Slow sledding...

Edited by Hedon James

Share this post


Link to post
Share on other sites
raymac46
Posted (edited)

Thanks for the clarification. I am a perfectionist myself and I like to have everything look and perform correctly. But at least you can get your work done.

Looking at your problem from 30000 feet as I am, it seems you made many changes at once to a mission critical system - distro, desktop, VMM, remix. That makes it hard to troubleshoot. I did read that the Samba maintenance GUIs are not being maintained themselves and that they are 2nd gen Samba whereas the software is now gen 4 at least. That explains why Debian is phasing the GUIs out I guess.

Edited by raymac46

Share this post


Link to post
Share on other sites
securitybreach

The network problem is probably your network settings in virt-manager. If you use host, you could see everything but by default it uses a virtual network. Hence why you can't see anything

Share this post


Link to post
Share on other sites
Hedon James
5 hours ago, raymac46 said:

Thanks for the clarification. I am a perfectionist myself and I like to have everything look and perform correctly. But at least you can get your work done.

Looking at your problem from 30000 feet as I am, it seems you made many changes at once to a mission critical system - distro, desktop, VMM, remix. That makes it hard to troubleshoot. I did read that the Samba maintenance GUIs are not being maintained themselves and that they are 2nd gen Samba whereas the software is now gen 4 at least. That explains why Debian is phasing the GUIs out I guess.

 

Also correct...dead-on correct.  I tested, beta tested, and installed on non-critical laptops before I attempted the main mission critical machine.  And everything seemed fine.  But there's only so much testing you can do in a vacuum....there are variables that just can't be accounted for.  For everything that changed at the same time, I think it turned out mostly okay.  A few snafus, but no workdays missed and no deadlines missed.  Just lost a few weekends with troubleshooting issues.  But all in all...about as good as could REALISTICALLY be expected.

 

Normally, I would've built a new mission critical machine, installed and tweaked software, and basically built a "proof of concept" machine that was 100% beta-tested, running parallel with the old machine.  Once the "proof of concept" received a passing grade, then I would've migrated everything over.  That's how I've always done it before.  And then I just "bump" every machine down a level.  But for the first time in life, I'm pretty happy with ALL my hardware and setups.  Nothing is cutting edge state-of-the-art, but everything is more than sufficient to handle what I throw at it, and it's in good working order (knock on wood!).  I just couldn't bring myself to replace the current mission-critical machine when the hardware handles everything just fine.  I've got an i7-4770 quad core, 16GB RAM, ssd for OS, HDD for data, and larger HDD for backups.  It performs wonderfully, so I see no reason to "upgrade" when the current is sufficient.  My software was the issue, but replacing the OS only introduced a whole new set of problems to solve.

 

Hopefully, when its time to do this again I'll need new hardware.  And I'll build the parallel system and tweak it to 100% compatible and working order before I slide the old one out, and seamlessly slide the new one into its place.  Next time...hopefully...

Share this post


Link to post
Share on other sites
raymac46

Note I am not slagging you for over modification or changing all the things you attempted. Frankly I think you did very well getting as far as you did. I would never have even tried to do as much.

It's just that I have memories of going through four cycles of replacing a formula control system in my old job - mainframe to AS/400 to distributed PC to a second PC system that the company higher-ups mandated. Each time involved re-keypunching the data, retraining and running two systems in parallel until we were satisfied. That left me very twitchy when it comes to walking the high wire without a safety net.

Share this post


Link to post
Share on other sites
Hedon James

I didn't take your comments that way, Ray.  You and I think very much alike, and I think your assessment was spot on.

 

I didn't like my choices very much.  Build a prototype with new hardware I didn't need, run it parallel with the old, and slide it sideways into production as soon as verified ready.  OR, build a new OS, beta-test, massage, and repeat until able to replace a live OS in a 2-day window with NO downtime.  I knew the 2nd choice was gonna make me twitchy (and it did!), but I also knew the 1st choice was gonna make me ALWAYS wonder if I couldn't have pulled off the 2nd scenario.  You know the rest...

 

And I think I pulled it off pretty well, all things considered.  But the unforseen "little" problems are probably going to persist for alot longer than I'd like.  Those issues are gonna bug me too, but at least we'll be operational and making a living while I figure it out!  😎

  • Like 1

Share this post


Link to post
Share on other sites
raymac46

I don't know if I ever related the story of how our Unilever factories converted over to SAP materials planning. A Tale of Two Factories.

Factory #1 had 3  mutually incompatible systems - receiving, production and shipping/accounting. Each was a separate fiefdom and each baron was happy with their system. SAP could do everything - just not in the way they liked. It was a nightmare for the SAP team running 3 parallel operations out of a trailer in the parking lot. Took a lot longer and cost a fortune.

Factory #2 had a paper based system from the 1950s. They were happy with ANY computer based software that improved their productivity by an order of magnitude. It was a slam dunk for their team.

 

Share this post


Link to post
Share on other sites
securitybreach

We still deal with SAP Logon in the enterprise sector. Well I do not use it but I have to troubleshoot it sometimes.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...