Help root cannot access smb share

InGenetic

Contributor
Joined
Dec 18, 2013
Messages
183
hi all,
i'm using freenas Version: FreeNAS-11.3-U2.1 , why in my freenas user "root" cannot access smb share ?
i create 1 dataset (smb), then share the dataset .

i try to access that folder from my lan network , to browse ip freenas\smbshare, using root cannot access , the password root is right.
but in other freenas which version is FreeNAS-11.1-U6 , i can access the smbshare using user"root" then i create permission folder inside it through windows permission share ,

did i can do that using root user to access the smb share in freenas 11.3-U2.1 ?

regards,
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
hi all,
i'm using freenas Version: FreeNAS-11.3-U2.1 , why in my freenas user "root" cannot access smb share ?
i create 1 dataset (smb), then share the dataset .

i try to access that folder from my lan network , to browse IP freenas\smbshare, using root cannot access , the password root is right.
but in other freenas which version is FreeNAS-11.1-U6 , i can access the smbshare using user"root" then i create permission folder inside it through windows permission share ,

did i can do that using root user to access the smb share in freenas 11.3-U2.1 ?

regards,
If password for root was added via CLI in 11.2, then the user won't be able to access the share. We are more strict in 11.3 about keeping Samba's passdb in sync with the freenas config file. If root needs access, try changing the password in the GUI. This will generate an NT hash for the password and allow SMB access.
 

FalconSteve

Cadet
Joined
Mar 15, 2020
Messages
2
If you were, in theory, so careless that not only were you using root to access SMB, but that is where you were storing files, including priceless photos & video, tens of thousands of documents, etc... How would you go about moving those files to an accessible place?

Complications
~Reason for upgrade was that old freeNAS boot drive failed (now boot drives are redundant- like it should have always been)
~Already upgraded array (not sure if this matters)
~I do not know the exact name of everything that needs moved

I can't just stick the old USB in and move the files, then go back
 

Stux

MVP
Joined
Jun 2, 2016
Messages
4,419
If you were, in theory, so careless that not only were you using root to access SMB, but that is where you were storing files, including priceless photos & video, tens of thousands of documents, etc... How would you go about moving those files to an accessible place?

Complications
~Reason for upgrade was that old freeNAS boot drive failed (now boot drives are redundant- like it should have always been)
~Already upgraded array (not sure if this matters)
~I do not know the exact name of everything that needs moved

I can't just stick the old USB in and move the files, then go back
You could move them using the commandline. But you could also just give some other account access to whatever dataset/directory you were sharing, and login with that account instead of root.
 

FalconSteve

Cadet
Joined
Mar 15, 2020
Messages
2
Here's what I see what I go to storage on TrueNAS GUI

The files seem to be on the pool above the standard datasets. I lost access when I lost access to files via root

I can't remember how to list or move files via shell/command line (it's been a while)
I also can't remember how to delete snapshots via shell/command line (GUI limits you to only 100 per batch and that is way too slow).
I mention these to give you an idea of how rusty I am
 

Stux

MVP
Joined
Jun 2, 2016
Messages
4,419
Is "Falcon" the name of your pool?

Do you think its correct to say that most of your files are in the root directory of your pool?

I see 35GB in FalconSteve, 63GB in "home", etc. Where are the files that you are looking to find/recover?

Its generally not a good idea to store files in the root of a pool. Its a much better idea to at least have one dataset, that you then serve from.

You will be able to move them from there to another location though.

What I'm not 100% certain of is if the ACL permissions of the files will carry across when you move them from the root to another dataset.

The problem is I don't think you can change the permissions of the root of the pool.

Anyway, before you can start the transfer you need to work out two things

1) You need to setup a proper SMB share from a dataset, if you have not already.
2) You need to workout how to connect to the command line via SSH (Putty etc)

then once you've done that, you navigate to where your files are

"cd /mnt/"
"ls"
etc.

Once you've found your files

Use "mv" to move them somewhere you can access them via SMB.

"man mv" for the manual.

mv will actually copy and delete behind it as it moves files between datasets. So it won't be instant.

In order to have the copy finish even if you close the terminal you should type "tmux" before starting.

If you do close the terminal and want to re-attach to the tmux session you started previously, type "tmux a" in a new terminal when you reconnect.
 
Last edited:

Redcoat

MVP
Joined
Feb 18, 2014
Messages
2,925

Stux

MVP
Joined
Jun 2, 2016
Messages
4,419
Top