ONTAP Hardware

how to create one user on many netapp FAS systems quickly?

DavidCao
3,720 Views

I have about 60 systems and need to create one account for me. I planed to use script to add from the adminhost but failed. ssh hostname useradmin user add ** -p * -c "** " -g Administrators.   looks like this doesn't work for remote shell. do i need to ssh into that host and run the command in the storage system? please help me out. Thanks.

4 REPLIES 4

magheinzmagheinz
3,711 Views

Try powershell: New-NaUser/New-NcUser

DavidCao
3,709 Views

i am using linux as the adminhost....so powershell is not working for me.

bobshouseofcards
3,683 Views

David -

 

I've run into this before as well.  The issue is "ssh".  Quoting from the man pages for useradmin...

 

The -p requirement during rsh sessions for add specifies the password for the user. This password must conform to the rules found in the options "security.passwd.rules".

 

Notice that it states "-p" is for "rsh sessions".  It really means it too.  When you use ssh, it won't take the "-p" parameter.

 

Since you're on Linux, may I suggest you get a copy of the Management SDK - it has a really good Perl interface that essentially mirrors the PowerShell toolkit that people like to talk about.  Besides the low level basic XML building functions common to all supported languages, the Perl interface includes a set of wrapper functions around all the ZAPI functions.  This actually makes it better than the PowerShell toolkit because the PS Toolkit doesn't include every function nor does it include every option of the functions it does (examples include any options/commands that require advanced privilege mode).

 

I use the Perl toolkit heavily.  It takes a bit of getting used to with respect to the wrapper functions - the function calls are fairly straight forward, but it can take a bit to process results due to the way the data is returned in nested hashes/arrays (depending on type of result).  Another advantage for me is that the scripts run everywhere, because the Perl SDK is itself written in Perl.  Granted the PowerShell stuff works well in Windows centric shops, but I prefer to keep options open and go Perl.

 

Hope this helps.

 

 

Bob Greenwald

Lead Storage Engineer | Huron Legal, Huron Consulting Group

NCDA | NCIE-SAN Clustered Data OnTap

 

 

DavidCao
3,641 Views

I have got the solution for this. We can not add -c "***". The problem is "". I just use  -p password -g administrator. It worked....

Public