You are Here:
NEW High Spec Repository is LIVE



I need help with samba

Author (Read 8118 times)

0 Members and 5 Guests are viewing this topic.

Re: I need help with samba
« Reply #16 on: August 01, 2022, 02:27:17 AM »
 

stevef

  • Global Moderator
  • I come here a lot
  • *****
  • 339
    Posts
  • Reputation: 59
  • Linux Lite Member

  • Linux Lite: 5.8 64bit

  • CPU: Intel Core i5-4460

  • MEMORY: 16Gb

  • Kernel: 5.x
Starting a fresh thread is fine - but you need to provide more information.

The post reads like you are trying to access a drive connected to a router.  If that is correct, then you may need to review the router's resource sharing documentation/setup before looking at the client.

 

Re: I need help with samba
« Reply #15 on: July 31, 2022, 12:39:04 PM »
 

Fredrik Erlandsson

  • New to Forums
  • *
  • 1
    Posts
  • Reputation: 0
OMG I finally got it.  I have seriously put 18 hours into getting this to work today.  I HATE SAMBA.  Anyway the problem was that I never set the second hard drive to auto mount.  Once I did that the directory info changes.  You just have to change smb.conf to match.  This is what it looks like now.
Code: [Select]
#======================= 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 ===================================
[liteshare]
path = /home/%U/linux_share
available = yes
valid users = %U %G
write list = %U
browsable = yes
public = yes
writable = yes
guest ok = yes
read only = no
printable = no
locking = no
strict locking = no

[Gunroom]
path = /mnt/11390a57-b9fd-4fbb-849a-a1006275139d/shares/
available = yes
valid users = %U %G
write list = %U
browsable = yes
public = yes
writable = yes
guest ok = yes
read only = no
printable = no
locking = no
strict locking = no

Thanks everyone for giving me pointers.  If nothing else I learned a lot about samba today.

Hello and sorry for the bump on this old topic, but I am having major issues with my USB-drive connected to my router.
I can't seem to edit the smb.conf file. I don't have the permissions  :(
 

Re: I need help with samba
« Reply #14 on: March 03, 2019, 04:30:37 PM »
 

bitsnpcs

  • Platinum Level Poster
  • **********
  • 3237
    Posts
  • Reputation: 305
    • Try to Grow

  • Linux Lite: 3.2 64bit

  • Kernel: 4.x
Great work @Phobos84 for sticking at it :)
 

Re: I need help with samba
« Reply #13 on: March 02, 2019, 10:22:52 PM »
 

Phobos84

  • New to Forums
  • *
  • 8
    Posts
  • Reputation: 1
  • Linux Lite Member

  • Linux Lite: 4.2 64bit
OMG I finally got it.  I have seriously put 18 hours into getting this to work today.  I HATE SAMBA.  Anyway the problem was that I never set the second hard drive to auto mount.  Once I did that the directory info changes.  You just have to change smb.conf to match.  This is what it looks like now.
Code: [Select]
#======================= 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 ===================================
[liteshare]
path = /home/%U/linux_share
available = yes
valid users = %U %G
write list = %U
browsable = yes
public = yes
writable = yes
guest ok = yes
read only = no
printable = no
locking = no
strict locking = no

[Gunroom]
path = /mnt/11390a57-b9fd-4fbb-849a-a1006275139d/shares/
available = yes
valid users = %U %G
write list = %U
browsable = yes
public = yes
writable = yes
guest ok = yes
read only = no
printable = no
locking = no
strict locking = no

Thanks everyone for giving me pointers.  If nothing else I learned a lot about samba today.
 

Re: I need help with samba
« Reply #12 on: March 02, 2019, 09:41:58 PM »
 

bitsnpcs

  • Platinum Level Poster
  • **********
  • 3237
    Posts
  • Reputation: 305
    • Try to Grow

  • Linux Lite: 3.2 64bit

  • Kernel: 4.x
The systems each need to know the other system exists, and where to find it to connect to it, the route to it.
See this preparing the installing, it explains - https://wiki.samba.org/index.php/Setting_up_Samba_as_an_Active_Directory_Domain_Controller#Preparing_the_Installation

About using the LL Manual as @firenice03 wrote, you had said you are reusing the conf file from a previous install. 
Have you tried the manual from the start on this new computer, without using the conf from the previous machine ?
The link in this post also shows how to clean the environment to do a new install.
« Last Edit: March 02, 2019, 10:03:27 PM by bitsnpcs »
 

Re: I need help with samba
« Reply #11 on: March 02, 2019, 09:08:35 PM »
 

Phobos84

  • New to Forums
  • *
  • 8
    Posts
  • Reputation: 1
  • Linux Lite Member

  • Linux Lite: 4.2 64bit
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/Multiple_Server_Instances
Explains for multiple servers but looking at the adresses format is what I meant.

sorry but your talking over my head.  What ip address?
 

Re: I need help with samba
« Reply #10 on: March 02, 2019, 09:05:22 PM »
 

Phobos84

  • New to Forums
  • *
  • 8
    Posts
  • Reputation: 1
  • Linux Lite Member

  • Linux Lite: 4.2 64bit
I used the help manual to get me here.  It didn't work.
 

Re: I need help with samba
« Reply #9 on: March 02, 2019, 08:42:09 PM »
 

firenice03

  • Rockin' the FREE World
  • Global Moderator
  • Platinum Level Poster
  • *****
  • 1823
    Posts
  • Reputation: 281
  • Linux Lite Member

  • Linux Lite: 5.8 64bit

  • CPU: AMD E2//Atom X5//AMD Phenom II X2

  • MEMORY: 4Gb

  • VIDEO CARD: AMD Mullin Radeon R2//Intel//AMD/ATI RS880

  • Kernel: 5.x
If you're not too far into it... The help manual has an easy set up...
https://www.linuxliteos.com/manual/network.html#shares
« Last Edit: March 02, 2019, 10:09:52 PM by firenice03 »
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
 

Re: I need help with samba
« Reply #8 on: March 02, 2019, 08:38:42 PM »
 

bitsnpcs

  • Platinum Level Poster
  • **********
  • 3237
    Posts
  • Reputation: 305
    • Try to Grow

  • Linux Lite: 3.2 64bit

  • Kernel: 4.x
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/Multiple_Server_Instances
Explains for multiple servers but looking at the adresses format is what I meant.
« Last Edit: March 02, 2019, 08:47:18 PM by bitsnpcs »
 

Re: I need help with samba
« Reply #7 on: March 02, 2019, 08:34:33 PM »
 

Phobos84

  • New to Forums
  • *
  • 8
    Posts
  • Reputation: 1
  • Linux Lite Member

  • Linux Lite: 4.2 64bit
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
 

Re: I need help with samba
« Reply #6 on: March 02, 2019, 08:29:22 PM »
 

Phobos84

  • New to Forums
  • *
  • 8
    Posts
  • Reputation: 1
  • Linux Lite Member

  • Linux Lite: 4.2 64bit
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?
 

Re: I need help with samba
« Reply #5 on: March 02, 2019, 07:57:43 PM »
 

bitsnpcs

  • Platinum Level Poster
  • **********
  • 3237
    Posts
  • Reputation: 305
    • Try to Grow

  • Linux Lite: 3.2 64bit

  • Kernel: 4.x
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: [Select]
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%20to%20Create%20a%20Network%20Share%20Via%20Samba%20Via%20CLI%20%28Command-line%20interface/Linux%20Terminal%29%20-%20Uncomplicated%2C%20Simple%20and%20Brief%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.

« Last Edit: March 02, 2019, 08:34:09 PM by bitsnpcs »
 

Re: I need help with samba
« Reply #4 on: March 02, 2019, 07:34:56 PM »
 

Phobos84

  • New to Forums
  • *
  • 8
    Posts
  • Reputation: 1
  • Linux Lite Member

  • Linux Lite: 4.2 64bit
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.
 

Re: I need help with samba
« Reply #3 on: March 02, 2019, 07:21:59 PM »
 

Phobos84

  • New to Forums
  • *
  • 8
    Posts
  • Reputation: 1
  • Linux Lite Member

  • Linux Lite: 4.2 64bit
Ok this is what it came back with

Code: [Select]
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
 

Re: I need help with samba
« Reply #2 on: March 02, 2019, 06:52:54 PM »
 

bitsnpcs

  • Platinum Level Poster
  • **********
  • 3237
    Posts
  • Reputation: 305
    • Try to Grow

  • Linux Lite: 3.2 64bit

  • Kernel: 4.x
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_up_Samba_as_a_Standalone_Server
« Last Edit: March 02, 2019, 06:55:01 PM by bitsnpcs »
 

 

-->
X Close Ad

NEW High Spec Repository is LIVE