Try using the IP address instead of the NETBIOS name, it’s usually more reliable that way. Also the error you are getting is because the /mn folder needs to be created beforehand (the mount command doesn’t create the mount point for you). Also make sure you have the cifs package installed for your distro. Hope this helps :)
Comment on Best Network File Sharing before a NAS
Okus@lemmy.dbzer0.com 1 year agoThank you. I am attempting this today. I seem to be struggling with this. I typed in $ sudo mount -t cifs //HOME/sharedmain /mn
HOME is my pc and sharedmain is the folder I created and shared with everyone.
When I run it I get: Couldn’t chdir to /mn: no such file or directory.
I’ve googled a couple of these terms but I’m not getting any cleaner answers.
NightEagle@lemmy.world 1 year ago
Okus@lemmy.dbzer0.com 1 year ago
Ok thanks. I have created /mn, but now it prompts for a password for root@//192.168.69.69/sharedmain
But I didn’t set a password
thorbot@lemmy.world 1 year ago
I’d just create a generic file share username and password locally in windows and use that from linux. It’s better to have some sort of credentials for your share anyway
NightEagle@lemmy.world 1 year ago
It’s using the current user “root” as a login user for the share. You can specify a different share user using following command:
`# mkdir /mnt/cifs
mount -t cifs //server-name/share-name /mnt/cifs -o username=shareuser,password=sharepassword,domain=nixcraft
mount -t cifs //192.168.101.100/sales /mnt/cifs -o username=shareuser,password=sharepassword,domain=nixcraft`
Try specifing a user that does exist on your Windows machine. Not quite sure if it will work without a password, but you can try.
BearOfaTime@lemm.ee 1 year ago
Windows expects to see a user account from it’s own domain. Without specifying a username/password in the mount command, there’s no credentials for windows to use to allow access to the share.
MangoPenguin@lemmy.blahaj.zone 1 year ago
Does /mn exist? You can’t mount to a non-existant folder.
nehal3m@sh.itjust.works 1 year ago
Make sure the dir you are mounting to exists. If it doesn’t, create it with:
mkdir /mn
TCB13@lemmy.world 1 year ago
I assume your PC is at home and the server at the datacenter. If you actually try to this you’ll most likely end up with broken files and I/O errors because your home’s internet connection might fail, drop or whatever.
Okus@lemmy.dbzer0.com 1 year ago
Well it’s just a tiny Linux server I made in my house, it stays within my network.
TCB13@lemmy.world 1 year ago
You can follow the other recommendation about mounting SMB shares under Linux or eventually setup an SSH server on Windows and use SSHFS to mount it on the Linux machine. SSH is usually faster than SMB however both of them will have issues, what if the network goes down the windows machine sleeps, reboots, crashes or someone steps on a network cable etc? You are better by avoiding those kinds of setups all together. It is very likely that the connection will drop and the Linux machine will have trouble writing on the mount causing errors and screwing the files.