Active IQ Unified Manager Discussions

WFA Local User 7-Mode Creation with CIFS access permission

Richy_TH
3,731 Views

Dear All

I have suscessfully to create local user on 7-Mode controller with be command below:

####################

 

param (
[parameter(Mandatory=$true, HelpMessage="Cluster (controller) IP or name.")]
[string]$Cluster,

[parameter(Mandatory=$false, HelpMessage="Name of the vfiler.")]
[string]$vFiler,

[parameter(Mandatory=$true, HelpMessage="User Name.")]
[string]$User,

[parameter(Mandatory=$true, HelpMessage="Password.")]
[Alias("Password_Password")]
[string]$Password

)


# connect to controller
Connect-WfaController -Array $Cluster

Get-WFALogger -Info -message $("Creating User share: " + $User + "Password: "+ $Password)
# Add User

 

$SecPassword= Get-WfaInputPassword -EncryptedPassword $Password

 

New-NaUser -User $User -Password $SecPassword -Groups "Users"

 

######

 

the output of the command as below:

 

Screen Shot 2558-09-02 at 6.59.27 PM.png

 

 

as you can see on the storage site:

 

netapp-dc> useradmin user list test_user_02
Name: test_user_02
Info:
Rid: 131091
Groups: Users
Full Name:
Allowed Capabilities: api-snmp-get,api-snmp-get-next
Password min/max age in days: 0/4294967295
Status: enabled

 

_________________________

 

the user has been created 

__________________________

 

netapp-dc> cifs shares
Name Mount Point Description
---- ----------- -----------
ETC$ /etc Remote Administration BUILTIN\Administrators / Full Control
HOME /vol/vol0/home Default Share everyone / Full Control
C$ / Remote Administration BUILTIN\Administrators / Full Control
SJP_SAPSWAP /vol/SJP_SAPSWAP/SJP_SAPSWAP ** priv access only **
cifs_test /vol/cifs_test everyone  / Full Control

 

________________________________

 

then i have try to give the access to test_user_02 to cifs_test shares

 

________________________________

 

netapp-dc> cifs access cifs_test test_user_02 Full Control
Unknown user/group test_user_02

_______________________________

 

so in order to solve the problem i have to use Oncommand system manager to set password for test_user_02

 

Screen Shot 2558-09-02 at 7.17.29 PM.png

 

 

after that the user would be able to add to the cifs access:

 

 

netapp-dc> cifs access cifs_test test_user_02 Full Control
1 share(s) have been successfully modified

 

so anyone have any idea what was wrong in the WFA command.

why do i need to reset password via Oncommand System Manager in order to make use of the User that create by WFA.

 

Best Regards,

Richy

1 ACCEPTED SOLUTION

sinhaa
3,723 Views

The cmdlet New-NaUser expects -Password in string format. See below

 

PS H:\> get-help New-NaUser

NAME
New-NaUser

SYNOPSIS
Adds a user given the information provided.


SYNTAX
New-NaUser [-User] <String> [-Password] <String> [-FullName <String>] [-Comment <String>] [-Groups
<String[]>] [-PasswordMinAge <Int64>] [-PasswordMaxAge <Int64>] [-Controller <NaController>]
[<CommonParameters>]

 

 

Cmdlet Get-WfaInputPassword returns the password in SecureString format and not plain sting that you entered at command execution. 

 

Convert it to plain-text by adding the below line

 

$PlainPassword= ConvertFromSecureToPlain -SecurePassword $SecPassword

 

 

sinhaa

If this post resolved your issue, help others by selecting ACCEPT AS SOLUTION or adding a KUDO.

View solution in original post

2 REPLIES 2

sinhaa
3,724 Views

The cmdlet New-NaUser expects -Password in string format. See below

 

PS H:\> get-help New-NaUser

NAME
New-NaUser

SYNOPSIS
Adds a user given the information provided.


SYNTAX
New-NaUser [-User] <String> [-Password] <String> [-FullName <String>] [-Comment <String>] [-Groups
<String[]>] [-PasswordMinAge <Int64>] [-PasswordMaxAge <Int64>] [-Controller <NaController>]
[<CommonParameters>]

 

 

Cmdlet Get-WfaInputPassword returns the password in SecureString format and not plain sting that you entered at command execution. 

 

Convert it to plain-text by adding the below line

 

$PlainPassword= ConvertFromSecureToPlain -SecurePassword $SecPassword

 

 

sinhaa

If this post resolved your issue, help others by selecting ACCEPT AS SOLUTION or adding a KUDO.

Richy_TH
3,694 Views

thank you so much. sinhaa  🙂

 

Best Regards,

Richy

Public