Hello, I’m an old man (nearly 80) and have been using computers since the 1960’s. Lately, I’ve been using Windows and have decided to try something else and have decided on Ubuntu. I have used Knoppix and Ubuntu a long time ago and recently Python. So I know a little about Linux. Yesterday I downloaded 24.04 Ubuntu and secussfully got it installed on a computer. I wanted to have a dual boot with Win 7 and got that to work after some head scratching. But my imaging software Clonezilla will not work with this set up, due to problems with the BIOS and GRUB. So, I’m think that I will just keep Win 7 on it’s own computer, and so for Ubuntu. I have a bunch of the apt’s working, am currently having trouble connecting to my NAS via Ubuntu. I’ve googled this some, but have not had any sucess so far. I want the NAS to mount auto when the computer is turned on. So seems I have to alter fstab and create some credentials then mount the NAS. What I would like to know is what is cifs-utils, is fstab accessed during the boot and will this setup work everytime I start the machine? Thanks a million, Mike
Well… Here is what I did and where I think I’m having trouble
I added this line to fstab at the end of the file (amoung other things) //192.1.168.100/share_name /mnt/nas/ cifs credentials=/home/my name/.smbcredentials,uid=1000,gid=1000,_netdev 0 0
I think the trouble is the share_name. What is it? do I have to name it or is it already named? Thanks Mike
Well… I figured out what the shared_name is, it is the computer name of the NAS. But after correcting that I still can not access the NAS via Ubuntu. Still doing something wrong, Mike
Another update. I restarted the machine and now I have listed in the files, CIFS shares on freenas, which is the name of my NAS. But I noticed that freenas is all small letters. My NAS name is freeNAS, NAS in caps. Is this a problem? Mike
Still having trouble. Seems Ubuntu can not get an answer from the server, so I’m thinking the credentials or share name are wrong, but have checked them many times. here is what I did.
sudo apt update
sudo apt install cifs-utils
sudo mkdir /mnt/nas
I believe that these commands worked. I think that the /mnt/nas is where the NAS files would be saved? If this is correct, how large does this have to be? The NAS is >2TB. Is just the NAS directory here? My Ubuntu disk is not this large.
Next I made
sudo nano ~/.smbcredentials
and entered this into this file
username=my NAS user name
password=my NAS password
I checked these a few times for accuracy and spelling. Wonder a little about if capital letters can be used and tried all caps, all smalls and the actual way the spelling is. I would think that the actual is what is needed.
Next the fstab file was added to, I added this //192.1.168.100/share_name /mnt/nas cifs credentials=/home/my_ubuntu name/.smbcredentials,uid=1000,gid=1000,_netdev 0 0
After saving this I did
sudo mount -a
Then I get this message
mount error(115): Operation now in progress
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) and kernel log messages (dmesg)
So… I’m at a loss. Any help?
Thanks Mike
Are you sure it’s not 192.168.1.100 (you wrote 192.1.168.100 which is not a home network IP address)? You also need to be sure about share_name for this to work.
You can try this simplified manual mount (replace your_username, your_password, ip_address, share_name as needed), the command is one long line: sudo mount -t cifs -o username=your_username,password=your_password //ip_address/share_name /mnt/nas
This will mount your NAS share until next boot, once you get that working we can try and add it to your /etc/fstab permanently to persist reboot.
If the manual mount was successful, you should be able to see the NAS share contents by doing: ls -l /mnt/nas
Robert, I appreciate your reply. I did have the two numbers in the IP mixed up (old age problem?), but it didn’t change anything.
I tried the manual method that you suggested and got this error message
mount error: Server abruptly closed the connection.
This can happen if the server does not support the SMB version you are trying to use.
The default SMB version recently changed from SMB1 to SMB2.1 and above. Try mounting with vers=1.0.
mount error(112): Host is down
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) and kernel log messages (dmesg)
BUT, am not sure what it really means. Mike
Well… I tried another item. I opened firefox in Ubuntu and entered the freeNAS IP address and I got into the freeNAS and it asked me for my username and password. I got in and could look around, but I could not find what the share_name is. BUT… this verifies that my ip address, NAS username and password are correct.
I still am unsure was what the shared_name is. I found somewhere that it is the name of the shared folder, but I don’t know that either. Any Ideas? Thanks Mike
Looking at my FreeNAS via the IP address as stated previously, I found that the WINDOWS share name is freeNAS. There are no apple share names or unix share names. I think the WINDOWS share name is what I need, but it still doesn’t work. I’m lost, any help? Mike
The default name for the Windows SMB share seems to be winshare and the default SMB version is 2 in FreeNAS.
Also, I think the username and password for the SMB share is different from the username and password for the NAS itself, this is something you set specifically for the SMB share in the configuration of FreeNAS.
So, with that in mind, try something like this:
sudo mount -t cifs -o username=your_username,password=your_password,vers=2.0 //192.168.1.100/winshare /mnt/nas
I assume this is a manual mount that you are suggesting. I tried it and in the terminal window I get a right carot followed by blinking cursor, as if something is waiting for some entry. I tried a few things and all that happened was a CRLF and a new right carot. A CTRL C got me back to the terminal window prompt. I’ll try these parameters in my files next, Mike
One other thing, so far I’ve been guessing at this. I’d like to know exactly how Ubuntu does this network connect. Maybe I can get a clue on what to look for.
Is it that when the system boots or I do a mount command, the fstab file is looked at and //192.168.1.100 line command is issued. Will that cause Ubuntu to attempt to connect to the NAS via the IP address, issue the username and password. What should occur then? Mike
If the mount in /etc/fstab worked you should see it mounted with mount | grep 'nas' or just do ls -l /mnt/nas to see the content of FreeNAS.
If you want to temporarily disable the //192.168.1.100 mount from /etc/fstab while testing, edit the file and comment it out with # as the first character of the line (no need to remove the whole line).
I don’t have any experience running FreeNAS, but I think you need to check the FreeNAS configuration using the web interface and look for the SMB / Samba section to make sure you have the correct share name and credentials (username and password).
After thinking about this for a while, I think that Ubuntu is asking the correct questions of my NAS, except for maybe the share. My NAS may not understand this share or maybe doesn’t have the correct share setup. My NAS works just fine with Windows and that is the puzzling part. So, anyway, I think I will go to the NAS forum and ask some questions over there, believing that my NAS maybe the problem here. I really appreciate the help, let you know if I get this thing to work. Mike
OK, sounds like a good plan, let me know how it goes.
There are some SMB (Samba) server (FreeNAS) settings to change version to a lower one or enable old style “Guest access” mode where no password is needed (only the username ‘guest’), but these modes reduces security and add even more factors to consider when testing so perhaps best to use only if advised by someone having experience using Linux with FreeNAS via SMB.
Ubuntu can also mount via NFS which could be another option (looks like FreeNAS supports NFS shares).
Well… success through failure! While I was trying to connect Ubuntu to my old FreeNas, I screwed up something, I think it was my fstab file and Ubuntu froze up and I could not start it. So back to the beginning. I cleared out the Ubuntu partition and redid the install. Everything seemed to go as before, fortunately I keep some notes. I followed, I thought, what I did prior, including setup of samba and SMB1. Then I thought I was back to square one. I tried entering SMB://IP_ADDRESS on the file manager and all of a sudden I got into the freeNAS, but there was an Authentication Required dialog box pop up. I filled it out and I was in. I could see all the files on FreeNAS. So I thought I’d try the CIFS Shares on Freenas that is listed on the file manager and it also worked. So, I must of done something previously wrong, spelled something wrong and could not find it. Now it works.
What I really need is some documentation on how Ubuntu works on startup, and other things. I hate guessing at everything and just trying blindly suggestions. I would like to be a little more knowledgeable about this OS. Any suggestions as to what I could read? Other than that, I’ll look around on the internet. Thanks a million for all the help. Mike