Microsoft Virtualization Discussions

Problems with PowerShell Toolkit and VFilers



I am trying to automate the creation of AD integrated CIFS Servers with VFilers (Multistore) via the PowerShell Toolkit, but I an having some problems with that.

This is my script, so far everything works fine:

$nahost = "netapp01"

$navfiler = "myvfiler1"

$navfiler_root = $navfiler + "_root"

Connect-NaController $nahost

New-NaVol $navfiler_root aggr_data 500m -SpaceReserve none

New-NaVfiler $navfiler -Addresses -Storage $navfiler_root

$b = New-Object NetApp.Ontapi.Filer.Vfiler73.IpbindingInfo

    $b.Interface = "e0a"

    $b.Ipaddress = ""

    $b.Netmask = ""

Set-NaVfilerAddress $navfiler -IpBindingInfo $b

Set-NaVfilerDns $navfiler vie.demo

Set-NaVfilerPassword $navfiler p@ssw0rd

Connect-NaController $nahost -Vfiler $navfiler

When I then try to add the vfiler to the domain, I am getting errors:

Set-NaCifs -CifsServer $navfiler -AuthType ad -SecurityStyle ntfs -Domain -User Administrator -Password p@ssw0rd

Set-NaCifs : 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.

At line:1 char:11

+ Set-NaCifs <<<<  -CifsServer $navfiler -AuthType ad -SecurityStyle ntfs -Domain -User Administrator -Passwor

d p@ssw0rd

    + CategoryInfo          : InvalidOperation: (netapp01:NaController) [Set-NaCifs], ECIFS_PASSWD_AND_GROUP_REQUIRED

    + FullyQualifiedErrorId : ApiException,DataONTAP.PowerShell.SDK.Cmdlets.Cifs.SetNaCifs

Then I have tried, for example, to add a local User to the vfiler, but it also fails:

New-NaUser Administrator p@ssw0rd Administrators

New-NaUser : Could not add user <Administrator>. Error: User cannot access group(s)

At line:1 char:11

+ New-NaUser <<<<  Administrator p@ssw0rd Administrators

    + CategoryInfo          : InvalidOperation: (netapp01:NaController) [New-NaUser], EINTERNALERROR

    + FullyQualifiedErrorId : ApiException,DataONTAP.PowerShell.SDK.Cmdlets.Useradmin.NewNaUser

When I add a user to the hosting-filer, everything works fine.

But I can list the groups of the vfiler...


Name                 Comment                                  Roles

----                 -------                                  -----

Administrators       Members can fully administer the filer   {admin}

Backup Operators     Members can bypass file security to b... {backup}

Compliance Admini... Members can perform compliance operat... {compliance}

Guests               Users granted Guest Access               {none}

Power Users          Members that can share directories       {power}

Replicators          not supported                            {none}

Users                Ordinary Users                           {audit}

Any ideas what can be wrong?

Kind regards,



Problems with PowerShell Toolkit and VFilers


Hi Matthias,

The /etc/passwd & /etc/group files do not exist on new filers/vfilers, so you may have to create them.  You can use the "New-NaCifsPasswordFile" and "New-NaCifsGroupFile" commandlets without any arguments to create them.  After that "Set-NaCifs" should work.

I've run into the error where I could not create users through a vfiler context in PowerShell/ZAPI but I could through the commandline, but I don't recall what the problem is/was.  Anybody else want to chime in with the answer to that one?

View solution in original post

Problems with PowerShell Toolkit and VFilers


Hi Eric,

great, thank you, Set-NaCifs works now.

With New-NaUser I receive the same error. Probably there's anotherone out there who knows about the problem with vfilers and local users?

Kind regards,


Problems with PowerShell Toolkit and VFilers



Which version of the Toolkit are you using?  If you issue a Get-NaUser command to the vfiler, is there a root user in the output?  I am able to reproduce the issue on my side if I try New-NaUser before a root user exists on the vfiler.  If you are using a pre-1.5 version of the toolkit (toolkit 1.5 was just released at the end of last week), then the Set-NaVfilerPassword cmdlet will fail to create the root user on the vfiler if it does not already exist.  See this thread for more information:

In my test, once the root user was created, New-NaUser worked as expected.

Hope that helps,


Problems with PowerShell Toolkit and VFilers


Hi Beam!

I am using v1.5 of the toolkit. The root user exists:

PS C:\Users\Administrator> Get-NaUser

Name                 Comment                                  Groups

----                 -------                                  ------

root                                                          {Administrators}



Re: Problems with PowerShell Toolkit and VFilers


Interesting... does the same issue occur if you use Connect-NaController to connect to the vfiler directly?

$vfiler_ip = ""

$vfiler_password = ConvertTo-SecureString "p@ssw0rd" -AsPlainText -Force

$ps_cred = New-Object System.Management.Automation.PSCredential @("root", $vfiler_password)

Connect-NaController $vfiler_ip -HTTP -Credential $ps_cred


Problems with PowerShell Toolkit and VFilers


Hy Steven!

This works!

But I guess it should work running it with "Connect-NaController $nahost -Vfiler $navfiler" either?



Re: Problems with PowerShell Toolkit and VFilers


Fine, works!

I have made comments to the script and published it.

Thanks for your help!



Re: Problems with PowerShell Toolkit and VFilers


I think the problem is the useradmin-* ZAPIs expect the user of the pfiler to exist on the vfiler when called using vfiler tunneling.  In my case, I was logged into the pfiler as root, so everything worked for me once the root account was created on the vfiler.  Connecting directly to the vfiler avoids this.  Once you create the necessary users on the vfiler you should be able to go back to using vfiler tunneling.


Earn Rewards for Your Review!
GPI Review Banner
All Community Forums