ONTAP Discussions

security login create user non-interactive

sboonstr
3,589 Views

has anyone figured out how to create users over ssh (key based) .. i think what's missing is the -password field  🙂

Tried a few things but it keeps prompting for a password;

 

security login create -user-or-group-name test -application ssh -authmethod password

Please enter a password for user 'test':

 


Something similar to 'security login create -user-or-group-name test -application ssh -authmethod password -password somepassword

 

this is required for an ansible playbook, not bash

3 REPLIES 3

Sahana
3,557 Views

Hi,

 

Please refer 

SSH Key Generation (passwordless non-interactive SSH) document.

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

sboonstr
3,518 Views

the issue is not generating ssh keys entry, that one is easy  🙂

i need to be able to create 5-6 ssh users per cluster (10+) i need to do this scripted via ansible, or keyed ssh ..
the problem is that the controllers ask for a password when you generate the ssh user.
Also splitting it and create the user, then set the password separatly does not work, whenever yo create the user it requires the password to be entered.

 

 

 

 

georgevj
3,476 Views

I dont see any possibility for this using the CLI. You may do this easily by using NMSDK though. 

Dont know much about ansible, is it possible to add NMDSK into it? or as a work around, Can you  create a perl script or something that uses our api "security-login-create" and trigger that script from ansible?

If this post resolved your issue, help others by selecting ACCEPT AS SOLUTION or adding a KUDO.
Cannot find the answer you need? No need to open a support case - just CHAT and we’ll handle it for you.
Public