Unable to connect Manjaro and antix system with Samba

Hello everybody,

I have no clue to networking. I have tried in the past several times to establish connection between computers and have failed. However, this time I cannot letgo. This has become necessary for me. So I am here. I have searched through the web and this forum for discussions that relate to my issue but could not find similar ones or solutions.

I am trying to setup a Samba share between a Manjaro and another system booted with antiX-live USB but I am unable to achieve it. I am not able to discern where the problem lies. First I have setup Samba share on Manjaro and then I am trying to connect it with ‘connectshares’ application on on antiX-live system. The error I am getting on antiX system is;

“unable to mount sambashare on folder-named-with-ip-address-of-Manjaro-system”.

The two systems that I am trying to connect:

They are two Laptops with the following specifications.

  1. One is a 10 year old 3 GB RAM, 300 GB HDD, i3 M 380 booted with antix live USB. The HDD on this system has gone corrupted file system. So need to recover the files on the HDD with Photorec. I do not have another device to which I can save the recovered lost files. So have to connect another system on which there is space, through Samba share and save the recovered files on that system.

  2. The other system is a 3 year old 4 GB RAM, 1 TB HDD, i3 5005U, installed with Manjaro xfce OS.

I have connected the two systems with a straight (not crossover) Ethernet cable.

How did I setup Samba on Manjaro: I did it on the terminal taking guidance from an YouTube video which sets up Samba on Archlinux with command line. I did the following on the Manjaro system.

After updating the system, I gave the following commands in the terminal;

$ samba --version
Version 4.14.2
$ sudo systemctl disable samba
$ sudo nano /etc/samba/smb.conf

After this I did the following editing to the file /etc/samba/smb.conf. Inserted the below, inside the /etc/samba/smb.conf file at the end of that file.

[MySambaShare]
comment = My Samba share
path = /samba
writable = yes
browseable = no
create mask = 0700
directory mask = 0700
read only = no
guest ok = no

After doing this, I issued the following commands;

$ sudo systemctl stop samba
$ sudo groupadd -r sambausers
$ sudo usermod -aG sambausers Username
$ sudo smbpasswd -a Username
New SMB password:
Retype new SMB password:
Added user Username.
$ sudo mkdir /samba
$ sudo chown -R :sambausers /samba
$ sudo chmod 1770 /samba
$ sudo systemctl enable --now smb
$ sudo systemctl enable --now nmb
$ sudo systemctl restart smb.service
$ systemctl status smb
● smb.service - Samba SMB Daemon
Loaded: loaded (/usr/lib/systemd/system/smb.service; enabled; vendor prese>
Active: active (running) since Sun 2021-04-11 16:16:57 IST; 1h 6min ago
Docs: man:smbd(8)
man:samba(7)
man:smb.conf(5)
Main PID: 966 (smbd)
Status: “smbd: ready to serve connections…”
Tasks: 4 (limit: 4405)
Memory: 17.7M
CGroup: /system.slice/smb.service
├─ 966 /usr/bin/smbd --foreground --no-process-group
├─1011 /usr/bin/smbd --foreground --no-process-group
├─1012 /usr/bin/smbd --foreground --no-process-group
└─1095 /usr/bin/smbd --foreground --no-process-group

Apr 11 16:16:51 xxxxxxxxxx systemd[1]: Starting Samba SMB Daemon…
Apr 11 16:16:57 xxxxxxxxxx systemd[1]: Started Samba SMB Daemon.
Apr 11 16:16:57 xxxxxxxxxx smbd[966]: [2021/04/11 16:16:57.624279, 0] …/…/li>
Apr 11 16:16:57 xxxxxxxxxx smbd[966]: daemon_ready: daemon ‘smbd’ finished st>
lines 1-20/20 (END)

$ systemctl status nmb
● nmb.service - Samba NMB Daemon
Loaded: loaded (/usr/lib/systemd/system/nmb.service; enabled; vendor prese>
Active: active (running) since Sun 2021-04-11 16:16:51 IST; 1h 6min ago
Docs: man:nmbd(8)
man:samba(7)
man:smb.conf(5)
Main PID: 687 (nmbd)
Status: “nmbd: ready to serve connections…”
Tasks: 1 (limit: 4405)
Memory: 16.7M
CGroup: /system.slice/nmb.service
└─687 /usr/bin/nmbd --foreground --no-process-group

Apr 11 16:16:26 xxxxxxxxxx nmbd[687]: NOTE: NetBIOS name resolution is not su>
Apr 11 16:16:51 xxxxxxxxxx nmbd[687]: [2021/04/11 16:16:51.826402, 0] …/…/li>
Apr 11 16:16:51 xxxxxxxxxx nmbd[687]: daemon_ready: daemon ‘nmbd’ finished st>
Apr 11 16:16:51 xxxxxxxxxx systemd[1]: Started Samba NMB Daemon.
Apr 11 16:17:14 xxxxxxxxxx nmbd[687]: [2021/04/11 16:17:14.855452, 0] …/…/so>
Apr 11 16:17:14 xxxxxxxxxx nmbd[687]: *****
Apr 11 16:17:14 xxxxxxxxxx nmbd[687]:
Apr 11 16:17:14 xxxxxxxxxx nmbd[687]: Samba name server xxxxxxxxxx is now a l>
Apr 11 16:17:14 xxxxxxxxxx nmbd[687]:
Apr 11 16:17:14 xxxxxxxxxx nmbd[687]: *****
lines 1-23…skipping…
● nmb.service - Samba NMB Daemon
Loaded: loaded (/usr/lib/systemd/system/nmb.service; enabled; vendor preset: disabled)
Active: active (running) since Sun 2021-04-11 16:16:51 IST; 1h 6min ago
Docs: man:nmbd(8)
man:samba(7)
man:smb.conf(5)
Main PID: 687 (nmbd)
Status: “nmbd: ready to serve connections…”
Tasks: 1 (limit: 4405)
Memory: 16.7M
CGroup: /system.slice/nmb.service
└─687 /usr/bin/nmbd --foreground --no-process-group

Apr 11 16:16:26 xxxxxxxxxx nmbd[687]: NOTE: NetBIOS name resolution is not supported for Internet Protocol Version 6 (IPv6).
Apr 11 16:16:51 xxxxxxxxxx nmbd[687]: [2021/04/11 16:16:51.826402, 0] …/…/lib/util/become_daemon.c:135(daemon_ready)
Apr 11 16:16:51 xxxxxxxxxx nmbd[687]: daemon_ready: daemon ‘nmbd’ finished starting up and ready to serve connections
Apr 11 16:16:51 xxxxxxxxxx systemd[1]: Started Samba NMB Daemon.
Apr 11 16:17:14 xxxxxxxxxx nmbd[687]: [2021/04/11 16:17:14.855452, 0] …/…/source3/nmbd/nmbd_become_lmb.c:398(become_local_master_st>
Apr 11 16:17:14 xxxxxxxxxx nmbd[687]: *****
Apr 11 16:17:14 xxxxxxxxxx nmbd[687]:
Apr 11 16:17:14 xxxxxxxxxx nmbd[687]: Samba name server xxxxxxxxxx is now a local master browser for workgroup WORKGROUP on subnet 1>
Apr 11 16:17:14 xxxxxxxxxx nmbd[687]:
Apr 11 16:17:14 xxxxxxxxxx nmbd[687]: *****
~
~
~
~
~
~
~
~
~
~
~
lines 1-23/23 (END)

$ testparm
Load smb config files from /etc/samba/smb.conf
lp_load_ex: Max protocol NT1 is less than min protocol SMB2.
Loaded services file OK.
Weak crypto is allowed
Server role: ROLE_STANDALONE

Press enter to see a dump of your service definitions

#Global parameters
[global]
client min protocol = SMB2
dns proxy = No
log file = /var/log/samba/%m.log
map to guest = Bad Password
max log size = 1000
name resolve order = lmhosts bcast host wins
obey pam restrictions = Yes
pam password change = Yes
passwd chat = NewUNIXpassword %n\n ReTypenewUNIXpassword* %n\n passwd:allauthenticationtokensupdatedsuccessfully*
passwd program = /usr/bin/passwd %u
security = USER
server min protocol = SMB3
server role = standalone server
unix password sync = Yes
usershare allow guests = Yes
usershare max shares = 100
usershare path = /var/lib/samba/usershare
idmap config * : backend = tdb
force create mode = 0070
force directory mode = 0070

[homes]
browseable = No
comment = Home Directories
create mask = 0700
directory mask = 0700
valid users = %S

[printers]
browseable = No
comment = All Printers
create mask = 0700
path = /var/spool/samba
printable = Yes

[print$]
comment = Printer Drivers
path = /var/lib/samba/printers

[MySambaShare]
browseable = No
comment = My Samba share
create mask = 0700
directory mask = 0700
path = /samba
read only = No

After this I worked on antiX-live USB system. I updates and upgraded the live system and remastered it. There is an application called ‘Connectshares’ in antiX OS. I configured it and tried to connect the Manjaro system. Interestingly, the Manjaro system is detected and its IP address is displayed in Connectshares. However when I try to connect, it gives an arror as below;

Connectshare error: Did not mount sambashare on 192.168.xxx.xxx.

Now my queries in this task are:

  1. Is it right to connect the two systems with a straight (not crossover) ethernet cable? Or do I have to connect a router or a switch in between. I have a router and a switch. I tried connecting them in between the two systems but the situation became worse. The antiX live system did not even detect the Manjaro system, while it detected it without them. Or do I need to get a crosspver cable to connect the systems and start Samba share?

  2. As mentioned above I created a Samba share user with the command,

usermod -aG sambausers Username

Should this Username be the same as the Username created in the Manjaro system user accounts to which I would be connecting to share files with Samba?

  1. How can Samba login to the user account on the other system, without knowing its credentials like Username and Password of the user account on that OS?

Please guide me to find a solution to my problem. I would appreciate any suggestion in this regard.

Thank you and best regards

Hello @anilswipe :wink:

Ok slow down… First thing what be should checked is this:

If you connect 2 computers directly, it have to be like this:

computer A:

  1. static
  2. address: 10.0.0.1
  3. netmask: 255.255.255.0

computer B:

  1. static
  2. address: 10.0.0.2
  3. netmask: 255.255.255.0

Now check if they have a connection:

computer A:

ping 10.0.0.2

computer B:

ping 10.0.0.1

If yes… then you could go further to the samba share. But i personally would use sshfs, since you don’t need all features of samba and have 2 linux computers.

Both must have openssh installed and sshd must be running. Also sshfs must be installed.

Now you go on computer B and type:

sshfs -f username@10.0.0.1:/empty_folder /home/computer_b/empty_folder -o allow_other,reconnect,idmap=user

and enter your password.

Now you have mounted a folder on computer B over SSH from computer A and can copy files there to computer A.

I think that is much easier :smiley:

Thanks megavolt, for coming.

Please forgive my ignorance. Where do I set these values and how? In the terminal, in a GUI? What are the commands or procedure?

I chose Samba, because I am going to use this Samba setup between the two Laptops, to recover files with Photorec, as I mentioned in the first post, which I quote below.

When I am conducting the recovery procedure with Photorec, it asks for a place to save the recovered files and displays all the mounted partitions and/or directories. I thought, once the Samba-share folder of a system is mounted on the other system, Photorec will display that directory too, as a possible place to save the recovered files. So I opted for Samba. Is this possible with sshfs? If I connect the two systems using sshfs, would Photorec display the shared directory of the other system, so that I can choose it as the destination to save the recovered files?

Thanks and Regards

At least on Manjaro there is the normally the NetworkManager installed and at the GUI you have to edit the cable connection and set the values there. Should be nm-connection-editor.

Yes, the folder will on computer B, which connected to specific folder on computer A, will act like a normal folder. As long as sshfs is running the content of the folder on computer A will be visible on computer B. So i guess there is a option on photorec to save it to a local disk, then just choose the mounted sshfs folder.

Best regards :wink:

1 Like

Ah! that’s heartening, megavolt.

I will try those things and come back and report.

Thanks for the suggestion, megavolt.

Hello megavolt,

I tried many things but could not succeed in connecting the Manjaro and antiX systems. So what I did was, I installed Manjaro on the SD card by manual partitioning like we do on a HDD, expecting that it would be easy to connect a Manjaro with another Manjaro, and since one of the computers already had Manjaro on it.

The result was that both systems are now connected. However there is another problem now but it would be appropriate to start a new thread for that.

Thank you @megavolt, for your efforts.

Warm regards.