cf login Credentials were rejected, please try again - cloud-foundry

cf login is not working even if the password has been provided. It is again asking for password.
C:\McD\covid\cur>cf login -u passcode -p aLfKrLidQp
API endpoint: https://api.us-south.cf.cloud.ibm.com
Warning: Your targeted API's version (3.83.0) is less
than the minimum supported API version (3.85.0). Some
commands may not function correctly.
Authenticating...
Credentials were rejected, please try again.
Password:

Related

Set password for VM users when OS Login is enabled: Authentication token manipulation error

I have created a simple Google Cloud VM and enabled OS Login for it. Login using SSH keys works perfectly fine.
I would now like to allow individual users to sign in with a fixed password as well (instead of the public key).
Unfortunately, this results in an error:
$ sudo passwd myusername
passwd: Authentication token manipulation error
passwd: password unchanged
or
$ passwd
passwd: Authentication token manipulation error
passwd: password unchanged
Is it impossible to set passwords for users managed by OS Login?
By default, password-based logins are disabled for Google Cloud VMs.
Log in to the instance.
Edit the file /etc/ssh/sshd_config.
Look for the line PasswordAuthentication no.
Change it to yes.
Restart the SSH server: sudo systemctl restart sshd.
There are other password related settings. Review the documentation:
I had the same issue and found a very simple solution in Goggle's Documentation.
The user account created by Compute Engine doesn't have a password.
However, several desktop environments require one for unlocking
screensavers and authorizing administrative actions. It is therefore
important to set a password for your user:
Connect to the instance using SSH, as you did when you first set up the instance.
Create a password for the user:
sudo passwd $(whoami)

Google Compute engine WHM root password

I am updating my password using the sudo passwd command in the SSL.
It tells me I have changed the root password but when I try to login I get "The login is invalid."
Changing password for user root.
New password:
Retype new password:
passwd: all authentication tokens updated successfully.
Any ideas as to why this is not updating? (I am currently unable to login to WHM until this password updates).
Turns out I was using the wrong password originally. When I came to try the correct password it was still telling me I had the wrong details.
By the time I came to reset the password the server had blacklisted my IP (Too many attempts).
The solution was to remove the IP ban and everything was working fine again.
(Huge thanks to the cPanel Support team for helping me find the issue!!)

Cloud Foundry: Credentials were rejected

I'm having trouble with cf login. Whenever I try to login i get the following error:
Credentials were rejected, please try again.
Now I'm Aware that this is a known issue. But even with alternatives, I always get the same message.
What I've tried so far:
Git CMD; cmd.exe; Powershell;
cf login -u mail#adress.com; (and different variations)
cf auth "Mail#Adress.com" "MyPassword";
What else is there I can try or what am I missing?
When you run cf login or cf auth and specify a username/password, you are attempting to authenticate with UAA using a standard password based authentication. If your company uses single sign-on (i.e. SSO), this will not work.
When your company uses SSO, you need to run cf login -sso (that's it, no other flags). In this case, the cf cli will give you a link to click. You'll go to this link in your browser and it will display a one-time password. The cf cli will then prompt you for the one-time password, type it in and the cli will use that to log you in with your company's SSO system.
Again, if your company has set up SSO you must use the cf login -sso option to login. As far as I know, there's no way to tell from the cf cli if your company requires SSO, but you can tell if you go to login.system_domain in your browser (where system_domain the the DNS entry set up for CF). When you go to that page, you'll see the login form and when SSO is set up the bottom of the form will have a link that says "click here to login with SSO" or something like that. That link only shows up when SSO is enabled.

"Invalid Credentials given" error with valid credential (o-auth-provider)

I'm following OAuth2 provider tutorial. After setting up everthing correctly, I'm getting this error.
Invalid Credentials given
What am I doing wrong with request? I checked my username and password but it's 100% valid.
curl -X POST -d "grant_type=password&username=admin&password=j1357924680"
-u"TEAfdIRw5cE664Pd4X31wuD7y08er8Suim3SdZsr:dI65CQwo9glm9LN63twmqDSY2DHR9bbPqlSEIwktaOzMfAS7sSFirzCKi9enogNZmyHjqQeIYIqtwKY6RIUC7Lto22s4vDtB0Y7F5unffLdktHXPyPn7j593IAeHfTDp"
http://localhost:8000/o/token/
(If you want to see its actual source code) https://github.com/jbaek7023/DRFOAuth2
OAuth2 is very complicating

What is default password for Jupyter created on google's data proc

I set data proc using the steps in link here
https://cloud.google.com/dataproc/docs/tutorials/jupyter-notebook
But my jyputer keep asking for password
I didn't set any password.
I tried my google account password that doesn't work
I ran ../root$ sudo grep -ir password
and get following, so that confirmed no password is set
.jupyter/jupyter_notebook_config.py:## Hashed password to use for web authentication.
.jupyter/jupyter_notebook_config.py:# The string should be of the form type:salt:hashed-password.
.jupyter/jupyter_notebook_config.py:#c.NotebookApp.password = u''
.jupyter/jupyter_notebook_config.py:# Only used when no password is enabled.
.local/share/jupyter/runtime/nbserver-3668.json: "password": false,
Since the initialization action just installs from latest using conda install jupyter, this appears to have been caused by a recent upstream change, specifically upgrading the notebook component from 4.2.3 to 4.3.0 causing token-based auth to be turned on by default. A recent cluster I deployed a couple weeks ago using the out-of-the-box init action didn't have the same login you're seeing; the design of the init action is to let Google Compute Engine firewalls be your layer of defense and the SSH tunnel being your secure connection, rather than relying on various third-party implementations of auth from the different Hadoop/Spark tools and web UIs.
The solution will be to add a line to setup-jupyter-kernel.sh:
echo "c.NotebookApp.token = u''" >> ~/.jupyter/jupyter_notebook_config.py
to disable jupyter-side authentication altogether and revert to the behavior a couple weeks ago. Note that if you want to do this yourself you'll have to fiddle with the INIT_ACTIONS_REPO and INIT_ACTIONS_BRANCH settings in jupyter.sh which may take some getting used to if you haven't been customizing it already. We'll try to push a fix as soon as possible and once that's done you should be able to use the out-of-the-box init action without causing the login screen again.
If you already have a cluster running, you can disable the auth for your jupyter server by running that manually as root after SSH'ing into the master:
sudo su
killall -9 jupyter-notebook
echo "c.NotebookApp.token = u''" >> ~/.jupyter/jupyter_notebook_config.py
/dataproc-initialization-actions/jupyter/internal/launch-jupyter-kernel.sh
Alternatively, if you do want to keep the new default token-authorization approach, the jupyter server actually logs a generated token to /var/log/jupyter_notebook.log; look for a line stating The Jupyter Notebook is running at: http://[all ip addresses on your system]:8123/?token=[some-token-string-here]; that token string can be plugged in to the password field or in the URL parameter as it shows.
EDIT: The fix has now been committed into Dataproc's init action repository and synced to gs://dataproc-initialization-actions. Deployments out-of-the-box once again work without an extra login page in the Jupyter UI.
A new metadata option has also been added if you do want to specify a token which Jupyter also allows to be used in the password field, with key JUPYTER_AUTH_TOKEN. Use it as follows only if you want a login page requesting your specified token (no metadata keys are necessary if you just want the old behavior of no login page):
gcloud dataproc clusters create \
--initialization-actions gs://dataproc-initialization-actions/jupyter/jupyter.sh \
--metadata JUPYTER_AUTH_TOKEN=foobarbaz
Then your login password will be foobarbaz.
When you dont set any password you can login with the your server credentials where it is installed.