-1

I am trying to do a simple Samba share for a home network. I want anyone on the network to be able to r/w to it.

I followed this but not sure if I followed it exactly correctly, since, as best I can tell, this guide demonstrates how to share a folder on the same disk as the main system, while I am instead seeking to share a folder on an HDD within the same PC.

Following these instructions I made it to this point:

sudo chown -R smbuser:smbgroup /share

At some point after that command, this arose:

sudo: /etc/sudo.conf is group writable
sudo: /etc/sudo.conf is group writable
sudo: error in /etc/sudo.conf, line 0 while loading plugin "sudoers_policy"
sudo: /usr/lib/sudo/sudoers.so must be only be writable by owner
sudo: fatal error, unable to load plugins

I found no information on how to fix this and so decided to remove Samba completely to try reinstalling, however, the same message comes up when I run this, even as su.

I am now at the point where I cannot uninstall Samba to start over, and I've been at this for about four hours.

Can anyone kindly assist?

Giacomo1968
  • 53,069
  • 19
  • 162
  • 212
howdy
  • 1
  • Certainly not an answer to your question (thus the comment) but I have found it much easier to host my share on a windows box for my Linux boxes to access. Then the configuration for the Linux boxes is a simple samba client and not a 300 line smb.conf file. Don't get me wrong, I love Linux but I am telling you what was easier for me to host. Otherwise, if you have no windows in the mix, hosting FTP or NFS might be simpler to do inside of your firewalled network. – Señor CMasMas Oct 16 '21 at 21:24
  • I hear ya. I do'nt have an windows box. I have TBs of files on an external hd hooked up to a Macbook Pro. That HD is formatted Extended Journaled. I built a Linux box mostly to act as a file server and need to move TBs of data from that HD into my Linux box. – howdy Oct 16 '21 at 21:43

1 Answers1

0

It sounds a lot like you actually ran sudo chown -R smbuser:smbgroup / share or similar, and ended up changing the file ownership and permissions on the entire / rather than just the /share directory.

While this is technically repairable, it would actually be faster to reinstall Debian from scratch (that way you know you'll be starting with a working system, instead of finding leftover un-fixed file permissions months or years later).

This has nothing to do with Samba, in general, and uninstalling Samba wouldn't fix any of it.

u1686_grawity
  • 426,297
  • 64
  • 894
  • 966
  • Is there any way to verify what you suspect? Again, I was attempting to share a folder on an HDD inside my PC, nor a dir on the same disk as my OS. The HDD is currently empty. Can I somehow chenge permissions back to what they should be without reinstalling Debian? – howdy Oct 16 '21 at 21:39
  • Also, when following these instructions and considering I want to use a different disk, I did something like "sudo chown -R smbuser:smbgroup /media/username/diskname/share" would that have been correct or incorrect? – howdy Oct 16 '21 at 21:41