Calling CPanel API from a different server - cpanel

I have 6 VPS' with CPanel / WHM on. I currently have an admin section on each one that I use to create accounts and start some Crons. I would like to manage all this from one server but I can't connect using my script unless I use it on the server I am calling it for.
The error I get is: curl_exec threw error "couldn't connect to host" which I presume means the connection is actually being blocked. I have added a firewall rule for my admin server's IP but that doesn't help.
What do I need to allow in order to use the API cross server?
p.s I am using User / Pass authentication with PHP.
EDIT: Ok I can connect when changing the port to 2087 but get access denied messages.
Thanks.

OK sorted it.
I needed to change the port I was connecting on to 2087 (from 2082) and use the WHM root login credentials.

Related

Can you change anonymous in mysql general_logs?

I have mariadb server, which contains database and i have my website on apache server that connects to this database through PHP and my general logs seems like this:
logs and i dont like it shows "as anonymous" instead of for example "as apache". Can i somehow configure my apache server to integrate with it? Or should i use other logs than general_logs to get information what exactly send that query? My system is Fedora 33.
Some MySQL installations permit users to connect as the anonymous (unnamed) user to the server running on the local host.1
and if you head over to dba forum you find this on how to disable those:
https://dba.stackexchange.com/questions/51452/how-do-you-disable-anonymous-login
Subsequently you want to update your PHP configuration to login with the new credentials.

LDAP Authentication failed for Citrix Netscaler showing ("Error: '10.0.1.4' is a valid LDAP server. Valid Credentials are not provided)

I have tried every possible method starting from checking connection to resetting password with no special characters.
Couldn't solve the error of Invalid credentials in Citrix ADC 13.0 .
While adding LDAP authentication servers facing the same error over and over again. Have verified the account name, Base DN, Administrator Bind DN but nothing seems to work.
Server '10.0.1.4' is reachable.
port '389/tcp' is open.
'10.0.1.4' is a valid LDAP server.
Valid Credentials are not provided.
Even I could successfully bind from ldp.exe with simple auth (not using SSL) using the same creds. DC running on Windows Server 2016.
Base DN (location of users)= CN=Users,DC=#####,DC=local
Administrator Bind DN = CN=useradmin,CN=Users,DC=#####,DC=local
I had to contact Citrix technical support to get this resolved. He had me downgrade Netscaler to version 13.0.71.44 which fixed the issue. He said it was only a bug in the GUI but I have my doubts. I was originally at 13.0.79.64.

TeamCity LDAP configuration problems

I'm trying to configure LDAP authentication for teamcity but can't get it to work. I already configured some other services on this server to authenticate using LDAP and had no problems (so it's not fault of the DC).
Following describes my config file:
java.naming.provider.url=ldap://192.168.0.123:389/DC=server,DC=example,DC=com
java.naming.security.principal=ldap-user
java.naming.security.credentials=jE&4i.%$lpDr3#?
java.naming.security.authentication=simple
teamcity.users.login.filter=(&(sAMAccountName=$capturedLogin$)(memberOf=CN=Group1,CN=Users,DC=server,DC=example,DC=com))
teamcity.users.username=sAMAccountName
teamcity.auth.loginFilter=[^/\\\\#]+
teamcity.options.users.synchronize=false
teamcity.options.groups.synchronize=false
When I set authentication to 'none' it works (but I can't restrict access to a specific group). I also tried using the full user name (incl. domain; i.e. DOMAIN\ldap-user) and also tried to use full DN instead, but it didn't change anything.
In log i see that the ldap server returns error code 49, which means that the binding failed. Like mentioned before I already configured other services on this server to authenticate with the same ldap server and the same binding user and had no problems.
Does anybody know how to solve this issue?
Thanks in advance!
This is my configuration and It working fine. The synchronization is allowed so information like email and name there are no available but enable the login with NT Id and Credentials
java.naming.provider.url=ldap://amer.xxxx.com:389/DC=amer,DC=xxxx,DC=com
java.naming.security.principal=CN=SRVAMR-xxx,OU=CMAPPS,OU=Service,OU=Accounts,DC=amer,DC=xxxx,DC=com
java.naming.security.credentials=Pf867955
teamcity.users.login.filter=(&(sAMAccountName=$capturedLogin$)(memberOf=CN=AMR-GENOME-L,OU=GMA,OU=Security,OU=Groups,DC=amer,DC=xxxx,DC=com))teamcity.users.username=sAMAccountName
I Hope help you

Strange Web Deploy access issue

I'm getting an odd problem with connecting to a server.
The server's logs read:
2013-05-21 11:18:24 [IP ADDRESS] HEAD /msdeploy.axd site=[SITE NAME] 8172 administrator [MY IP] - 401 1 1326 214
I am using the administrator account so I can't understand why it's not allowing access!
I am using VS2012 and Web Deploy 3.0 on Server 2008R2 x86.
UPDATE
When using the command msdeploy.exe -verb:dump -source:iisApp=<sitename>,username=administrator,password=<urpassword>,authtype=‌​basic,computername=https://<yourserver>:8172/msdeploy.axd?Site=<sitename> -authtype=basic as suggested by #ShaikhOwais I get the following error:
Error Code: ERROR_USER_UNAUTHORIZED
More Information: Connected to the remote computer ("[COMPUTER NAME]") using the Web Management Service, but could not authorize. Make sure that you are using the correct user name and password, that the site you are connecting to exists, and that the credentials represent a user who has permissions to access the site.
"Make sure that you are using the correct user name and password" - yep.
"that the site you are connecting to exists" - yep
"the credentials represent a user who has permissions to access the site" - it's the administrator...
As stated in the comment above, you need to qualify the username with the domain to which your admin user belongs.
Your script should thus be:
msdeploy.exe -verb:dump -source:iisApp=<sitename>,username=
<DOMAIN>\administrator,password=<urpassword>,authtype=‌​
basic,computername=https://<yourserver>:8172/msdeploy.axd?Site=<sitename>
-authtype=basic
It happen with me and it was share permissions issue that time
Can you try "net use \server\c$\path\to\fodler" and see if you can access this directory?
If it does not help can you please reply -
Are you getting first time this error ? was you able to web deploy on the same server earlier or you are doing first time with this server ?

How do I authenticate to view mongodb's http console?

I'm running a mongodb process with the following line:
/usr/bin/mongod --dbpath /var/db/mongo --journal
According to mongodb's docs:
http://www.mongodb.org/display/DOCS/Http+Interface
I should be able to access the http console with http://myhost:28017
When I attempt to access the page it asks for authentication.
According to the docs if security is configured I would need to authenticate. But after looking at mongodb.org/display/DOCS/Security+and+Authentication it seems clear to me I'm not using any authentication. I don't run the process with the --auth option, nor are there any users when I run a db.system.users.find() command.
What's going on here?
I have been able to reproduce this, and this is not the intended behavior. I have filed https://jira.mongodb.org/browse/SERVER-4601 The fix version is 2.1.1
Thank you for bringing this to our attention!
In the meantime, there are two work-arounds:
1) Enter the credentials for authentication in the browser pop-up window
2) Remove all user credentials from each of your DBs (including admin) using db.system.users.remove()
Either of these should allow you to view the http console.
Greetings Brain,
i am using mongo V 2.4.6 and its on default port 27017, its http console is enabled by default but when you try to access from Network it ask for password and i dont know why as i am new to this and dont know the exact reason. by i have a way to access it.
Create a tunnel to your mongo Server and when you access, it wont ask for password. and if you are using putty.
enter host name
go to ssh on left menu options and click +
Than Click on tunnel
in Source port type 28017
in destination type localhost colon port 28017(sorry dont know how to write http url in localhost here in my post)
not click open and provide ssh username and password
now open browser on PC from where you are doing ssh .Type localhost and port 28017
and Boom its accessible and wont ask for username and password. hope it work for you, let me know if u need any help.