Skip to main content

API bash authentication.

Comments

2 comments

  • cPanelKenneth
    The --user parameter instructs the API tool to perform the action as the specified user. What you want instead is username, which instructs the API tool which user to act on. Example:
    /bin/ls -1 /var/cpanel/users | while read USER; do /bin/echo "Now processing ${USER} ..." /usr/sbin/whmapi1 ipv6_enable_account username=${USER} range=SHARED; done
    0
  • arjene
    Kenneth, thanks for your input. changed username to user and it's working:
    #!/bin/bash # /bin/ls -1 /var/cpanel/users | while read USER; do /bin/echo "Now processing ${USER} ..." /usr/sbin/whmapi1 ipv6_enable_account user=${USER} range=SHARED; done
    0

Please sign in to leave a comment.