ONTAP Discussions

ssh useradmin

dwcasey01
2,832 Views

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

3 REPLIES 3

scottgelb
2,832 Views

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.

dwcasey01
2,832 Views

-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.

columbus_admin
2,832 Views

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!

Public