Jump to content

I’m having trouble sharing between two computers on a home network. Both computers have the same account and PW on them. I recently left Windos10 and installed Ubuntu 20.04.3 Gnome Version 3.36.8.

 

In settings I turned on Sharing and selected the folders on each system. I installed samba on both systems. In the folders in properties and Local network share configured them for share. Both computers can see the folders on the other. One computer could see the share on the other and change the data with in. But not the other way. The next day when the systems booted they lost that share connection. Both see the folders on the other but when they try to access, the login window come up. Selecting Registered User and enter the PW. It then jumps to a grayed out window with “anonymous” selected and only has “Connect” on the upper right corner enabled. If you click on it it will just pop back up.

 

I know this is a “windows” solution to the problem. I need a simple solution. Not something five layers down in the file tree or another program to use and navigate to move files around.

 

Having a windows background it looked like a premonitions issue with user group or security. I can not find any info on this issue. Any help would be appreciated.

Link to comment
https://linustechtips.com/topic/1368572-sharing-in-linux/
Share on other sites

Link to post
Share on other sites

So I kinda hate to be that guy that doesn't tell you how to solve your problem the way you want it but in another way:
Have you thought about just using sshfs?

As I tinkered with samba, I had all kinds of problems; mainly how it handles high I/O and the permissions-config can get tricky. In addition, it's faster and well encrypted, can rely on keys instead of passwords and has the advantage for you to be able to access your drives from remote without using a VPN.

I'd recommend you look into it! For windows, you'll need to install the openssh-client/server and SSHFS as well as WinFSP.

Link to comment
https://linustechtips.com/topic/1368572-sharing-in-linux/#findComment-14958827
Share on other sites

Link to post
Share on other sites

16 hours ago, Arokan said:

So I kinda hate to be that guy that doesn't tell you how to solve your problem the way you want it but in another way:
Have you thought about just using sshfs?

As I tinkered with samba, I had all kinds of problems; mainly how it handles high I/O and the permissions-config can get tricky. In addition, it's faster and well encrypted, can rely on keys instead of passwords and has the advantage for you to be able to access your drives from remote without using a VPN.

I'd recommend you look into it! For windows, you'll need to install the openssh-client/server and SSHFS as well as WinFSP.

I'm willing to do almost anything if it works. I have found an intresting issue. If I go into settings a d turn off sharing. Both computers can access the share folder on each desktop. But still not see the one on a 2nd HD that holds the media. I need a solution that is simple. Can't be barried 5 levels down in a file tree or a program they need to load to then navigate and maneuver files. 

Link to comment
https://linustechtips.com/topic/1368572-sharing-in-linux/#findComment-14959930
Share on other sites

Link to post
Share on other sites

Then sshfs is your savior. It uses SSH as a method to transfer data while mapping the whole directory structure. It's like samba, but plain better in stability, speed and security.

 

Exchange SSH-Keys with on both PCs if you want to mount drives to each other and install sshfs.

ssh-keygen
ssh-copy-id $USER@ip.of.your.pc
sudo apt-get install sshfs -y

You could mount the drive via terminal, but for convenience, it's better to do it automatically via the fstab.

I'll post the switches I use and work seamlessly for me, should be fine for you as well.

sudo nano /etc/fstab
$USER@ip.of.your.pc:/your/directory	/home/$USER/MOUNT  fuse.sshfs      delay_connect,IdentityFile=/home/$USER/.ssh/id_rsa,idmap=user,port=PORT,rw,uid=1000,gid=1000,nosuid,nodev,_netdev,allow_other,default_permissions 0 0

Replace "$USER" with your username (although I don't even know if that's necessary), MOUNT with the directory to which you want to mount it, the port with your set port (never use 22) and "/remote/directory".

 

That should work out; if not, return to forum 😄
Hope I could help!

Link to comment
https://linustechtips.com/topic/1368572-sharing-in-linux/#findComment-14960022
Share on other sites

Link to post
Share on other sites

Sorry, I have gotten lost going over the commands etc. with...

ssh-copy-id $USER@ip.of.your.pc      It should read "ssh-copy-id USER@999.999.999.999"?

The switches confused me. I would presume I would need to put in a file path to the folder and the drive. When I enter "sudo nano /etc/fstab" command another system and does not respond as I would expect. After that is it one big command I need to edit to suit my system and file path or 1 part at a time?

 

Link to comment
https://linustechtips.com/topic/1368572-sharing-in-linux/#findComment-14970656
Share on other sites

Link to post
Share on other sites

1 hour ago, Toxked said:

Sorry, I have gotten lost going over the commands etc. with...

ssh-copy-id $USER@ip.of.your.pc      It should read "ssh-copy-id USER@999.999.999.999"?

The switches confused me. I would presume I would need to put in a file path to the folder and the drive. When I enter "sudo nano /etc/fstab" command another system and does not respond as I would expect. After that is it one big command I need to edit to suit my system and file path or 1 part at a time?

 

ssh-copy-id will assume you going into /home/$USER/.ssh/authorized keys by default, there's no need to declare a file path. Just a user account and which machine (ip address/host name)

Link to comment
https://linustechtips.com/topic/1368572-sharing-in-linux/#findComment-14970755
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×