Create a Post
cancel
Showing results for 
Search instead for 
Did you mean: 
SaffaRamma
Participant

Creating users via script/using CPDIR on SMB Devices

I know it is possible to execute commands from a management server (SMS) to a centrally managed SMB via CPDIR. For example, the below command works a treat (PS - 10.20.30.40 is not an actual IP I'm using):

$CPDIR/bin/cprid_util -server 10.20.30.40 -verbose rexec -rcmd /bin/clish -c "show configuration"

 

What does seem to be an issue however is the ability to add local administrators this way (I have tried multiple iterations of the below)?

$CPDIR/bin/cprid_util -server 10.20.30.40 -verbose rexec -rcmd /bin/clish -c "add user newadmin type admin password this_is_my_real_password permission RW"
Unexpected error: attempt to index global 'cgilua' (a nil value)

$CPDIR/bin/cprid_util -server 10.20.30.40 -verbose rexec -rcmd /bin/clish -c "add administrator username newadmin password-hash $1$UHVNJb2O$1UXMqCZm9767DZNtoIqYv. permission read-write"
Could not set administrator password-hash: Not valid password hash
Could not set administrator password-hash: Not valid password hash

$CPDIR/bin/cprid_util -server 10.20.30.40 -verbose rexec -rcmd /bin/clish -c "add administrator username newadmin password-hash '$1$UHVNJb2O$1UXMqCZm9767DZNtoIqYv.' permission read-write"
Could not set administrator password-hash: Not valid password hash
Could not set administrator password-hash: Not valid password hash

The above commands within the quotation marks work fine locally on the SMB device, but running the CPRID commands from the SMS fail with the errors in bold above.

0 Kudos
2 Replies
PhoneBoy
Admin
Admin

Yes, it should be supported.
That said, the canonical path to clish on SMB appliances is /pfrm2.0/bin/clish
If that still doesn't work, recommend a TAC case.

0 Kudos
SaffaRamma
Participant

Thanks for the quick response! Tried the change in canonical path ($CPDIR/bin/cprid_util -server 10.20.30.40 -verbose rexec -rcmd /pfrm2.0/bin/clish -c "add user testuser type admin password testuser123password permission R") and still no dice! I'll get a ticket raised with TAC.

0 Kudos