Bash script get user info
Hello,
into cpanel exits and script to get user information? (example, password, home directory)
usr/local/cpanel/scripts/data.sh -a user
user
pass
home directory
Regards,
-
Hello, You could extract the account username and document root data from the following file: /etc/userdatadomains
The password is not stored in plaintext format so you won't be able to view the actual password. The encrypted password data is stored in the /etc/shadow file. Thank you.0 -
my question is if there is any way to do it automatically from the server console, I use Centos 7. 0 -
Hello, There's no direct command for the exact output you want, however here's the best matched WHM API 1 function for what you are seeking: whmapi1 domainuserdata domain=example.com
It's documented at: WHM API 1 Functions - domainuserdata - Developer Documentation - cPanel Documentation Thank you.0
Please sign in to leave a comment.
Comments
3 comments