MAP network drive with root account

Status
Not open for further replies.

hbasbay

Cadet
Joined
Feb 27, 2017
Messages
6
Hello everyone. I just installed FreeNAS 9.10.2-U1 a week ago. I want to map whole disk with root account on my win7 pc. but I could not be successful. I use net use command to do this, But it gives me an error message "The system can not access the file" . I mentioned the details below. Thank you in advance for helping you.

the batch code that I use is: net use k: \\10.1.2.12\ user: root 123456 /p:yes ( 10.1.2.12 is the FreeNAS server)

PS: I also added the screenshot of FreeNAS.
free_nas.png
 
Last edited by a moderator:

hbasbay

Cadet
Joined
Feb 27, 2017
Messages
6
dear m0nkey_ thank you very much for your help and interest. I have watched the videos several times as you pointed out. But I could not solve the problem. I tried, but it did not.:(
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,553
Hello everyone. I just installed freenas 9.10.2-U1 a week ago. I want to map whole disk with root account on my win7 pc. but I could not be successful. I use net use command to do this, But it gives me an error message "The system can not access the file" . I mentioned the details below. Thank you in advance for helping you.

the batch code that I use is: net use k: \\10.1.2.12\ user: root 123456 /p:yes ( 10.1.2.12 is the freenas server)

PS: I also added the screenshot of FreeNAS.
free_nas.png

Okay. Several quick points here:
  1. Do not use your root credentials in a batch script to mount your freenas shares. Don't do it. Nope. Bad idea. So many better ways to do this. Did I mention that I don't recommend this? Yeah, none of that. Cannot recommend. Terrible idea even at home.
  2. Your net use does not seem to actually be pointing at a share. It should be something like net use k: \\<ip of server>\<share>.
  3. (a)You should create a user in FreeNAS that has the same username and password as your user account on Windows 7, (b) then create a dataset on your FreeNAS server that is owned by that user, (c)then share out that dataset using samba / SMB. Once you do this (a-c) you will not be asked to authenticate to the share, and you can write "net use" scripts to your heart's content without storing passwords in your batch scripts.
  4. Provide more information about your FreeNAS server. Physical or VM? Hardware Specs?
  5. Post contents of /usr/local/etc/smb4.conf. If that's a bit hard to get, you can post your debug file (click on "system" -> "advanced" -> "save debug").
 

hbasbay

Cadet
Joined
Feb 27, 2017
Messages
6
dear anodos. thank you very much for answer. I tried to do what you said. I could not be successful.
I gave up trying to solve the problem.
 
Status
Not open for further replies.
Top