LINUX LITE 7.2 FINAL RELEASED - SEE RELEASE ANNOUNCEMENTS SECTION FOR DETAILS


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
I need help with samba
#1
Hello,

I really need some help.  For whatever reason I struggle with samba every time I have to do anything with it.  This time though I am totally lost.  So I had an old P4 PC with an older version of Linux Lite that was set up as a media server.  After about 40 hours of messing with samba I got it to be visible and accessible by any computer on my network.  All was well until I upgraded to a new computer and installed the new version of Lite.  I can't get the network to work at all.  It can be seen by other computers but not accessed.  I have two hard drives in the computer.  On has the operating system and the other has the files I need to share on the network.  This is my smb.conf file

Code:
#======================= Global Settings ====================================
[global]
workgroup = WORKGROUP
server string = Linux Lite Shares
netbios name = Server
security = user
encrypt passwords = true
username map = /etc/samba/smbusers
map to guest = bad user
guest account = nobody
dns proxy = no
#======================= Share Definitions ===================================
[Server]
path = /media/chad2/backup/shares
available = yes
valid users = %U %G
write list = %U
browsable = yes
public = yes
writable = yes
guest ok = yes
read only = no
printable = yes
locking = no
strict locking = no

I'm clueless, any ideas?
Reply
#2
Hello Phobos84,

https://www.tldp.org/HOWTO/SMB-HOWTO-6.html 
"You can test the correctness of a smb.conf file , using the 'testparm' utility (man page: testparm); if testparm reports no problems, smbd will correctly load the configuration file."

Does testparm utility report any problems, or using it enabled you to solve it ? 

There are some samples of conf here, it may help notice a difference
https://wiki.samba.org/index.php/Setting...one_Server
Reply
#3
Ok this is what it came back with

Code:
chad2  ~  testparm
Load smb config files from /etc/samba/smb.conf
rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
Processing section "[Server]"
Loaded services file OK.
Server role: ROLE_STANDALONE

Press enter to see a dump of your service definitions

# Global parameters
[global]
    dns proxy = No
    map to guest = Bad User
    security = USER
    server string = Linux Lite Shares
    username map = /etc/samba/smbusers
    idmap config * : backend = tdb


[Server]
    guest ok = Yes
    locking = No
    path = /media/chad2/backup/shares
    printable = Yes
    read only = No
    strict locking = No
    valid users = %U %G
    write list = %U
 chad2  ~  


I don't know what any of this means
Reply
#4
The thing that bugs me the most about this is I used the same settings from the old smb.conf file.  I just changed the directory name to match the new computer.  It worked like a charm last time but this time nothing.  I would love to see a better way to do this.  I really don't like dealing with samba.
Reply
#5
I haven't used Samba so I am not sure either, I am looking around online for likely things to try.

On this link have a look at the step number 6 restart Samba (did you do this after changing the directory name ? plus it was for the previous machine.)

Code:
sudo service smbd restart

and number 8, compare the method of #8 to how you set up the network to see if this area is also good.
https://help.ubuntu.com/community/How%20...f%20Way%21

Another thing I thought maybe is to check if you have made a rule in UFW to allow Samba, you will have had that on the previous machine, and if it was not added as a rule on the new machine, then it would deny incoming connections.

As I have said I am not familiar with Samba, the conf file looks odd to me it seems to contradict itself.
It says map guests as a bad user in global settings.
But it says %G are valid users in server settings.
It could be Samba needs to define the guest so it can map it as a bad user, it would seem more that if it is not a valid user then it doesnt need to be mapped as a bad user.
Or it can not be in the valid user group and do map guests as a bad user, in case guests try to access it.
Otherwise they look like it could conflict, or at the least slow the code down.
Its just an idea.

Reply
#6
I followed step 6 and restarted samba.  I don't understand step 8.  The # List all shares:
      smbclient -L //<HOST_IP_OR_NAME>/<folder_name> -U <user>.  I don't know how to change this line to make it fit my application.  What do I put in for host, folder name, and user?
Reply
#7
Ok a few tings.  I just noticed that in the smb.conf that it has printable = yes.  This was making other computers see the server as a printer.  So I changed that to "no".  This didn't fix the connection problem but now my windows computer sees it as another computer and not a printer.  I still can't access anything. 

I did verify that the firewall does in fact allow samba
Reply
#8
For host it needs the Ip address, folder name is the name of the directory of the shared files, user is the username , as the conf file specifies %U, so the username of admin user on the machine running Samba.
During the searches I noticed about the Ip, dns it says on a multiple machine shares then it needs to be different for each one so they can be uniquely identified as which machine they are. I'll look for which link explained it. https://wiki.samba.org/index.php/Multipl..._Instances
Explains for multiple servers but looking at the adresses format is what I meant.
Reply
#9
If you're not too far into it... The help manual has an easy set up...
https://www.linuxliteos.com/manual/network.html#shares
LL4.8 UEFI 64 bit ASUS E402W - AMD E2 (Quad) 1.5Ghz  - 4GB - AMD Mullins Radeon R2
LL5.8 UEFI 64 bit Test UEFI Kangaroo (Mobile Desktop) - Atom X5-Z8500 1.44Ghz - 2GB - Intel HD Graphics
LL4.8 64 bit HP 6005- AMD Phenom II X2 - 8GB - AMD/ATI RS880 (HD4200)
LL3.8 32 bit Dell Inspiron Mini - Atom N270 1.6Ghz - 1GB - Intel Mobile 945GSE Express  -- Shelved
BACK LL5.8 64 bit Dell Optiplex 160 (Thin) - Atom 230 1.6Ghz - 4GB-SiS 771/671 PCIE VGA - Print Server
Running Linux Lite since LL2.2
Reply
#10
I used the help manual to get me here.  It didn't work.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)