[SOLVED] Connect two computers

Questions about Wi-Fi and other network devices, file sharing, firewalls, connection sharing etc
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Inoki

[SOLVED] Connect two computers

Post by Inoki »

Hi there,

is there a way to connect two computers, both running Linux Mint 10, so I can transfer files from one to the other?

The first computer is a laptop running x64 bit connected wirelessly to a router,

The second computer is a dekstop running x32 bit connected to the same router via cable.

The one I need to connect is the laptop to the desktop, so I can move files from the laptop to the desktop.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 4 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
IIJETHROII

Re: Connect two computers

Post by IIJETHROII »

You have to share folders you want to view on the other computer. Right-click these folders and then "Share"
Inoki

Re: Connect two computers

Post by Inoki »

that it? O.o

but when i right-click a folder i don't have any share option there. do i need to install additional software?
sgosnell

Re: Connect two computers

Post by sgosnell »

You should be able to connect them with ethernet, with or without a router in between. If you have a router, you can transfer files wirelessly, at least to/from the laptop. As mentioned, you need to share the folders you want to transfer files between. You should have a menu choice of "Sharing Options". You only need to install samba to share with Windows computers.
Inoki

Re: Connect two computers

Post by Inoki »

i installed samba from the repos but still no share option when i right-click any folder. any ideas?
altair4
Level 20
Level 20
Posts: 11458
Joined: Tue Feb 03, 2009 10:27 am

Re: Connect two computers

Post by altair4 »

What Desktop Environment are you running?

If it's gnome the following package should be installed by default. If not install it:

Code: Select all

sudo apt-get install nautilus-share
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
Inoki

Re: Connect two computers

Post by Inoki »

thanks, it worked, but for some odd reason it doesn't accept my password. it says the computer name, domain WORKGROUP and the only pass i know i set up is the login password and it doesn't accept it.
altair4
Level 20
Level 20
Posts: 11458
Joined: Tue Feb 03, 2009 10:27 am

Re: Connect two computers

Post by altair4 »

You need to set up the share to allow guest access. Why not post the output of the following commands so we can see how samba is set up:

Code: Select all

testparm -s

Code: Select all

net usershare info --long
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
Inoki

Re: Connect two computers

Post by Inoki »

the output of the desktop, i.e. the target computer on which the data will be stored is:

Code: Select all

Load smb config files from /etc/samba/smb.conf
rlimit_max: rlimit_max (1024) below minimum Windows limit (16384)
Processing section "[printers]"
Processing section "[print$]"
Loaded services file OK.
Server role: ROLE_STANDALONE
[global]
	server string = %h server (Samba, LinuxMint)
	map to guest = Bad User
	obey pam restrictions = Yes
	pam password change = Yes
	passwd program = /usr/bin/passwd %u
	passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
	unix password sync = Yes
	syslog = 0
	log file = /var/log/samba/log.%m
	max log size = 1000
	dns proxy = No
	usershare allow guests = Yes
	usershare owner only = No
	panic action = /usr/share/samba/panic-action %d

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

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

Code: Select all

[nové a stiahnuté súbory]
path=/media/sda5/My Documents/Nové a stiahnuté súbory
comment=
usershare_acl=Everyone:F,
guest_ok=n

[filmy]
path=/media/sda5/Filmy
comment=
usershare_acl=Everyone:F,
guest_ok=n
altair4
Level 20
Level 20
Posts: 11458
Joined: Tue Feb 03, 2009 10:27 am

Re: Connect two computers

Post by altair4 »

OK, everything is in place to allow guest access so go back into nautilus and right click /media/sda5/Filmy and select "guest access". For example it should be the bottom option on the dialog box like this:
Screenshot.png
There is one potential problem with this though and it is what you may be sharing ( NOTE: I may be making too many assumptions based on the "My Documents" part of the path so you may not need to do this ) :
/media/sda5/My Documents/Nové a stiahnuté súbory
/media/sda5/Filmy
If those are NTFS partitions and you are mounting them through nautilus then they will mount with you as owner and permissions of 0700 meaning only you have access. One way to fix this is to change the way you are mounting the partition but an easier way is to use samba to fix it by creating a mask that will convert the guest user to you for those shares.

Let's say you user name is inoki:

Edit smb.conf as root:

Code: Select all

gksu gedit /etc/samba/smb.conf
Add a line to the [global] section:

Code: Select all

force user = inoki
Save the file and restart samba:

Code: Select all

sudo service smbd restart
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
Inoki

Re: Connect two computers

Post by Inoki »

Thank you very much for your help and everybody who contributed to this thread. So far it seems working but I don't know why since I basically didn't have to follow the last steps to edit smb.conf and do the force user command.

One note though: I wasn't using any NTFS partition, but I have set up an auto-mount for the HDD since I re-installed Mint using Pysdm, that' why you see the shared folders as sda5.

Again, thank you. Should it for some reason not work again I'll just try the last steps in editing smb.conf.

Have a wonderful Christmas! :)
Inoki

Re: Connect two computers

Post by Inoki »

one more question,

today i started both pcs and when i tried to see the list of files on the desktop it gave the error that it couldn't mount the partition and that it failed to retrieve a list of shares from the server.

also, i've removed the solved mark from this thread since it seems not to be solved. i really hate when machines do what they want. one time it works, you re-boot your computer and again it doesn't work.

i'll mark this as solved when it works 100%.

attaching screen whose translation was provided above:

Image

this happened when i tried to connect from the laptop to the desktop, the same i did yesterday when it worked, today all of a sudden doesn't work.
altair4
Level 20
Level 20
Posts: 11458
Joined: Tue Feb 03, 2009 10:27 am

Re: Connect two computers

Post by altair4 »

2 Observations:

[1] I have no idea what "INNERDISTANCE-SA" is but if that's the laptop it's netbios name is one character too long.
The netbios name has to be 15 characters or less in length - yours is 16. This is a Samba requirement not a Linux requirement. One way to fix this is through Samba itself:

Edit smb.conf as root:

Code: Select all

gksu gedit /etc/samba/smb.conf
Add a line to the [global] section:

Code: Select all

netbios name = innerdistance
It doesn't have to be "innerdistance" but it has to be 15 characters or less

Save the file and restart samba:

Code: Select all

sudo service smbd restart
[2] This "it works one day and doesn't the other" problem.

The following modification to smb.conf works in a surprising number of cases - I suggest you give it a try:

Edit smb.conf as root:

Code: Select all

gksu gedit /etc/samba/smb.conf
Add a line to the [global] section:

Code: Select all

name resolve order = bcast lmhosts host wins 
Save the file and restart samba:

Code: Select all

sudo service smbd restart
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
User avatar
Pierre
Level 21
Level 21
Posts: 13224
Joined: Fri Sep 05, 2008 5:33 am
Location: Perth, AU.

Re: Connect two computers

Post by Pierre »

I actually use the supplied program "Giver" which comes from upstream.
But then, I only transfer a few files, on the odd occasion, that I need them on
another 'buntu /Mint based machine.
works thru my router just fine. :)
beats a thumb drive :D
Image
Please edit your original post title to include [SOLVED] - when your problem is solved!
and DO LOOK at those Unanswered Topics - - you may be able to answer some!.
pythagorean

Re: Connect two computers

Post by pythagorean »

It might be a problem inherited from Ubuntu which is this:

you need to install apache2.2-bin and libapache-mod-dns

or something like that to get sharing to work. Google Ubuntu File Sharing Apache Problem and you will find links/solutions.
altair4
Level 20
Level 20
Posts: 11458
Joined: Tue Feb 03, 2009 10:27 am

Re: Connect two computers

Post by altair4 »

pythagorean wrote:It might be a problem inherited from Ubuntu which is this:

you need to install apache2.2-bin and libapache-mod-dns

or something like that to get sharing to work. Google Ubuntu File Sharing Apache Problem and you will find links/solutions.
That has nothing to do with Samba. Samba doesn't require apache or avahi to function.

Those are the package requirements ( it's actually apache2.2-bin and libapache2-mod-dnssd ) for "Personal File Sharing" (PFS). PFS is another alternative but the drawback is that it doesn't play well with Windows and you can only share one folder: /home/username/Public.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
Inoki

Re: Connect two computers

Post by Inoki »

altair4 wrote:2 Observations:

[1] I have no idea what "INNERDISTANCE-SA" is but if that's the laptop it's netbios name is one character too long.
The netbios name has to be 15 characters or less in length - yours is 16. This is a Samba requirement not a Linux requirement. One way to fix this is through Samba itself:

Edit smb.conf as root:

Code: Select all

gksu gedit /etc/samba/smb.conf
Add a line to the [global] section:

Code: Select all

netbios name = innerdistance
It doesn't have to be "innerdistance" but it has to be 15 characters or less

Save the file and restart samba:

Code: Select all

sudo service smbd restart
[2] This "it works one day and doesn't the other" problem.

The following modification to smb.conf works in a surprising number of cases - I suggest you give it a try:

Edit smb.conf as root:

Code: Select all

gksu gedit /etc/samba/smb.conf
Add a line to the [global] section:

Code: Select all

name resolve order = bcast lmhosts host wins 
Save the file and restart samba:

Code: Select all

sudo service smbd restart
didn't work :/
pythagorean

Re: Connect two computers

Post by pythagorean »

well, altair, you and I always seem to end up in the same sharing threads. : )

If it was SAMBA related then the OP would have had to click on Siet Windows in the nautilus window, because that is the Windows Shares. They are clicking on Patio Desktop which should just open on the network if they have folders shared from that computer independently of samba. Which is why I mentioned the think about apache2.2 and libapache...
altair4
Level 20
Level 20
Posts: 11458
Joined: Tue Feb 03, 2009 10:27 am

Re: Connect two computers

Post by altair4 »

@inoki, please post the output of the following command:

Code: Select all

smbtree
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
altair4
Level 20
Level 20
Posts: 11458
Joined: Tue Feb 03, 2009 10:27 am

Re: Connect two computers

Post by altair4 »

pythagorean wrote:well, altair, you and I always seem to end up in the same sharing threads. : )

If it was SAMBA related then the OP would have had to click on Siet Windows in the nautilus window, because that is the Windows Shares. They are clicking on Patio Desktop which should just open on the network if they have folders shared from that computer independently of samba. Which is why I mentioned the think about apache2.2 and libapache...
Not so, it's a fluke with Nautilus that the hosts containing shares can show up twice - once by itself and again under Windows network:
Screenshot-1.png
Altair and Valtair are hosts containing samba shares. If I click on "Windows Network" they will show up again. "tester1's public files on altair" is a Personal File Sharing share BTW - that's how you can tell the difference between a PFS share and a Samba share.

Like I said there's nothing wrong with using PFS it's just not samba and he's already created shares using samba.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
Locked

Return to “Networking”