Subscribe

ssh useradmin

Are there any script examples using ssh from a unix ( aix ) server to run the useradmin command on multiple FAS250's running OnTAP 7.2.6.1?

I've cobbled together something using SSH and Expect, but it appears that OnTAP is only seeing the first two command I pass and truncating the rest.

If I simply run ssh from a prompt, I get an error

root@myserver:>ssh caseyd@filerserv01.domain.com useradmin user add jsmith -g administrators

caseyd@filerserv01.domain.com's password:

Could not add user <jsmith>. Error: Invalid parameter

ssh useradmin

try putting the password in the command after -g administrators... It doesn't work interactive, but if I remember correctly, you can specify the password non-interactive on the same line.  There is also a way to export the registry and import and import/commit the useradmin entries but that would be at your own risk and not officially supported.

ssh useradmin

-g administrators -p mypassword

Did the trick, thx. But...it's still a one at a time affair...I guess I need to get SSH setup so it doesn't ask for my password each time I connect to the filers.

ssh useradmin

Keep in mind that SSH key exchange with AD based accounts is not supported.  So if you login as domain\\user or user@domain, key exchange will fail.  The account that you use has to be an actual local account on the filer, if you are not using AD groups, then ignore this post!