Active IQ Unified Manager Discussions

Adding User in Vfiler

skellner
4,703 Views

I try to add a user in a vfiler. New-NaUser does not work in the vfiler context. It fails with an error message. Now I try to do it with Invoke-NaSsh to the hosting filer and the command useradmin user add miguser -p xxxx -g migration. The command works in the workflow. However, the user is not added in the vfiler although there is no error message in the messages. When I issue the same command on the cli the user is added. Any ideas? Thanks in advance.

Attached a few log extracts.

/etc/messages:

Workflow execution:

Mon Apr 29 14:08:58 CEST [E100BPMC003:cmds.vfiler.storUnit.add:notice]: Storage unit /vol/e041_its_001 was added to vFiler unit v998spnvv1041e.

Mon Apr 29 14:09:16 CEST [E100BPMC003:wafl.scan.start:info]: Starting SIS volume scan on volume e041_its_001.

Mon Apr 29 14:09:25 CEST [v998spnvv1041e@E100BPMC003:wafl.quota.sec.change:notice]: security style for /vol/e041_its_001/ changed from unix to ntfs

Mon Apr 29 14:09:46 CEST [E100BPMC003:wafl.scan.start:info]: Starting quota initialization on volume e041_its_001.

Mon Apr 29 14:09:57 CEST [v998spnvv1041e@E100BPMC003:useradmin.added.deleted:info]: The role 'Migration' has been added.

Mon Apr 29 14:10:04 CEST [v998spnvv1041e@E100BPMC003:useradmin.added.deleted:info]: The group 'Migration' has been added.

Mon Apr 29 14:11:32 CEST [E100BPMC003:wafl.scan.start:info]: Starting quota initialization on volume emc003_cifs_audit.

Mon Apr 29 14:12:23 CEST [v998spnvv1041e@E100BPMC003:cifs.auditfile.enable.on:info]: ALF: CIFS auditing started.

Mon Apr 29 14:12:24 CEST [v998spnvv1041e@E100BPMC003:cifs.auditfile.logSetting.notice:info]: ALF: change to option cifs.audit.autosave.file.extension: Autosave file naming policy is now based on time stamping.

Invoking "vfiler run v998spnvv1041e useradmin user add miguser -p xxx -g migration" from cli

Mon Apr 29 14:17:05 CEST [v998spnvv1041e@E100BPMC003:useradmin.added.deleted:info]: The user 'miguser' has been added.

/etc/log/auditlog:

Mon Apr 29 14:10:04 CEST [E100BPMC003: rshd_0:debug]: wfauser@[17.247.34.177_1200]:IN:ssh2 shell:SSH INPUT COMMAND is vfiler run v998spnvv1041e useradmin group add Migration -r Migration

Mon Apr 29 14:10:04 CEST [E100BPMC003: rshd_0:debug]: wfauser@[17.247.34.177_1200]:END:ssh2 shell:

Error from New-NaUser:

Import-Module DataONTAP

$filer = "E100BPMC003.e100.intern"

$vfiler = "v998spnvv1041e"

$user = "miguser2"

$pw = "miguser"

$cmd = "vfiler run " + $vfiler + " useradmin user add " + $user + " -p " + $pw + " -g Migration"

Connect-NaController $filer -vfiler $vfiler

New-NaUser -user $user -password $pw -groups Migration

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

Bei D:\WFA\Test_New-NaUser_Vfiler.ps1:15 Zeichen:11

+ New-NaUser <<<<  -user $user -password $pw -groups Migration

    + CategoryInfo          : InvalidOperation: (E100BPMC003.e100.intern:NaController) [New-NaUser], EINTERNALERROR

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

1 ACCEPTED SOLUTION

goodrum
4,703 Views

Stephan,

We had a pretty lively conversation about this a while back.  Take a look at this link and if that doesn't help then let me know.

https://communities.netapp.com/thread/27159

Jeremy Goodrum, NetApp

The Pirate

Twitter: @virtpirate

Blog: www.virtpirate.com

View solution in original post

2 REPLIES 2

goodrum
4,704 Views

Stephan,

We had a pretty lively conversation about this a while back.  Take a look at this link and if that doesn't help then let me know.

https://communities.netapp.com/thread/27159

Jeremy Goodrum, NetApp

The Pirate

Twitter: @virtpirate

Blog: www.virtpirate.com

skellner
4,703 Views

Hi Jeremy,

worked like a charm.

Thanks

Stefan

Public