Subscribe

Cifs setup with powershell

I have a filer I have just zeroed. I have added all my licenses back, and now I am trying to setup CIFS so that I can reinstall DataONTAP since Java is missing once you zero the filer. I am having two issues. The first issue, is if I try to run the set-nacifs commandlet. I can input the name, authype and securitytype, but as soon as I try to input the next value I get an error: "Unable to continue with cifs setup, as the /etc/passwd and/or /etc/group files are missing and none of the alternative authentication methods are enabled."

From my understanding, i thought this was suppose to work as if running cifs setup from the command prompt. If I do run cifs setup from the command prompt, I can then use the powershell commandlet. Is the /etc/passwd file being created when running cifs setups?

The other issue I am having is trying to pass the exsisting filer name as the value for the -cifsserver parameter. I can get that value by assining a parameter the value of get-nasysteminfo, and then getting the value of that new parameter.systemname. How can I pass this to the -cifsserver parameter as the value?

Thanks in advance.

Re: Cifs setup with powershell

For the /etc/passwd and /etc/group files, you can use the Toolkit cmdlets: New-NaCifsGroupFile and New-NaCifsPasswordFile.

For the server name, you can set the name in a variable and use that in the Set-NaCifs invocation:

PS C:\> $name = (Get-NaSystemInfo).SystemName
PS C:\> Set-NaCifs -CifsServer $name ...