ONTAP Hardware

Add text file to FAS2020 /etc

WARHORSE24
2,549 Views

Hello all,

I was wondering if there was a way to create/add a text file to the filer.  Long story short, my organizaiton has scripted installs taht are supposed to mount CIFS shares to our VMs.  We have been told that the scripts were tested (of course they were not, or else I wouldn't be posting this) but I've been looking at where the the script fails and "commenting out" areas that were causing the failure.  I'm at a point now where the script is looking for a text file that should have been added to the filer during IT'S scripted install (another failure apparently) and I think I can get through this issue if I can just give the script the text file that it's asking for.  If not, I'm more than willing to be walked through a manual CIFS mounting.  Thanks!!!!

-D

3 REPLIES 3

saurabhg
2,549 Views

Hi Andre

If I understand your question correctly, you need to mount the CIFS shares on your organization's filer to create some files.

Sorry if this is not the problem, you can skip reading rest of the reply.

Do you have the server and share details?

1) You can create your own batch file to map the CIFS share on your Windows client. I can help you out with that.

2) You can create that text file in the format \\<cifs-server-name>\<share-name>\mytextfile.txt

    This should allow your script to proceed with whatever it intends to do.

WARHORSE24
2,549 Views

Thank you for response.  I think I've found a way to generate the correct text file that will contain the needed information, so no I just need to figure out to place the file into the correct directory.  Can I use the command that you listed above to place the file?

-D

saurabhg
2,549 Views

Yes definitely you can use that command.

That command is useful to create files at network locations without mapping CIFS share. These are known as UNC paths and work exactly same way as mapped shares.

Please login to the Windows client with user credentials that has permission to view/create files in the share. Beyond that this command should work:

echo 'the text I want' > \\<cifs-server>\<cifs-share>\<filename>.txt

Public