SSH in google cloud shell I dont understant what information it's asking for - google-compute-engine

umer_aamir11_gmail_com#experiasol-wordpress-1-vm:~$ sudo su
We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:
#1) Respect the privacy of others.
#2) Think before you type.
#3) With great power comes great responsibility.
password for umer_aamir11_gmail_com:
Sorry, try again.
I dont understant what information it's asking for my passworsd is not workin on it.

I used the same command in my compute engine which is in Google Cloud Platform and logged in as root:
Last login: Tue Jun 23 XX 2020 from IP
[xxxx#vmname ~]$ sudo su
[root#vmname xxxx]#
As I understand, if you need to have root password for Google Cloud compute engine, link [1] could be helpful for you:
$ sudo passwd
Enter the new UNIX password:
Retype the new UNIX password:
passwd: password updated successfully
[1] Get root password for Google Cloud Engine VM

Related

How to reset root password of a Google Compute Engine VM?

I think I have locked myself out of my VM.
I have access as a low priv user I have created but the user can't sudo.
When I do SSH->Open in browser window I get a promp asking for a password which I have never set.
Any way to reset root password from the GCP Console?
Thanks, Pavel
To reset a root password for your GCP VM you need to grant appropriate IAM roles to your user to use sudo command. There is a similar post here. You can use the command 'sudo passwd' to change the password as suggested in that post.
Answering yout question you could simple run sudo commands using a startup script as the script would run as a root user, and then add your user in sudoers with sudo usermod -aG sudo, reference.
However, you could add a IAM role to your user in order to have admin access to a GCE VM, for example the roles/compute.instanceAdmin.v1, reference.

MySQL 5.6.26 (Windows 8.1 x64): Trouble with setting a password for the root MySQL user

I'm a newcomer to MySQL where I'm to learn on how to use it to build a database for a startup company, and it seems that I'm running into some trouble in learning on how to use it on Windows 8.1 x64. I've spent less than an hour trying to solve it on my own using Google and some questions already posted and answered here, but with no success.
In learning MySQL, I’m following along a series of YouTube videos my boss recommended that I follow and practice along. I went through the first video, but I would rather wait until I get my problem fixed up before I move on because I have a feeling I do need a root password for a tutorial that’s later on in this playlist.
The problem I’m having is setting the password for the root user and logging in. I’ve followed along this command from the “MySQL Installation” site on Command Prompt:
C:\Users\Gregory> mysqladmin –u root password “new_password”;
The error message it gives me is something like the following:
mysqladmin: connect to server at ‘localhost’ failed
error: ‘Access denied for user ‘root’#’localhost’ (using password: NO)’
Here’s what I get when I type in ‘mysqladmin –version’:
Mysqladmin Ver 8.42 Distrib 5.6.26, for Win64 on x86_64
What I downloaded was MySQL Community Server 5.6.26 as a Windows x64 ZIP archive, since the tutorial my boss provided me asks to unzip the compressed folder instead of using an MSI program that I could have downloaded. There was no setup.exe in the bin folder, so I simply moved the files to a folder in the root of my hard drive called “mysql” and added an extra path to my existing Environment Variables so that Command Prompt recognizes what I’m asking for without having to call the “cd” command multiple times.
Even if I did try to connect the user to the MySQL server, I would get the following (here, I’m using the password “new_password” as an example since the tutorial I used have used it in their example of setting a new password to the root):
C:\Users\Gregory> mysql –u root –p
Enter password: ************
ERROR 1045 (28000): Access denied for user ‘root’#’localhost’ (using password: YES)
Since at one point I really was getting confused, before I tried focusing on this issue for half an hour, I had to reset the password using MySQL’s own password reset procedure.
If I type in ipconfig –all instead, this is what I get under the “Windows IP Configuration” header:
Host Name : GregoryDES-PC
Primary DNS Suffix :
Node Type: Hybrid
IP Routing Enabled: No
WINS Proxy Enabled: No
I do get the host name, but the rest of the information don’t make any sense to me whatsoever.
I even tried using this, along with ‘—password=pass’ from a StackOverflow question, to connect, except I still couldn’t get on.
From coming across the Telnet Client service from one DevSide Forums post that I decided to enable and investigate, here’s what I did and what I get in return:
C:\Users\Gregory> telnet 8000
Connecting To 8000…Could not open connection to the host, on port 23: Connect failed
I also tried “mysqladmin –uroot –pmysuperscretpassword proc” from another StackOverflow question that was answered:
Warning: Using a password on the command line interface can be insecure.
mysqladmin: connect to server at ‘localhost’ failed
error: ‘Access denied for user ‘root’#’localhost’ (using password: NO)’
Setting the host with the ‘—host’ option on mysqladmin and what I was given from ‘ipconfig –all’ has no effect on setting the password for the root user.
I can’t even fetch the actual root password from the MySQL program I have installed, because from a StackOverflow question, it involves using it to access it and reveal it from a database.
I can’t even start a MySQL server to see if this is needed for the root user to log in, as I show you in a photo:
Could you please help me out here?
What on earth was I thinking back there?
I simply decided to reset my password back to blank to the user using the same reset instructions I used before, tried logging in after entering the 'mysql' command with the options needed, and it actually worked. So I reverted back to the password I created before, and now I'm back on business.

Erro Connection Root VM Instance Computer Engine Google Cloud?

I have Install SDK then log in (gcloud auth login). I can't log in SSH VM google cloud?
with message "CommandError: Logging into instances as root is not recommended. If you actually wish to log in as root, you must provide the --permit_root_ssh flag."
how to log in SSH root??
I can not log in to the VM Instances. I look login VM Instances https://developers.google.com/compute/docs/quickstart#setup
$gcutil ssh
then message "CommandError: Logging into instances as root is not recommended. If you actually wish to log in as root, you must provide the --permit_root_ssh flag."
I have log in
ssh ..
Massage" Host key verification failed."
So how to log
You usually don't login as root to your GCE instances. Instead, you log in as an unprivileged user, and then use sudo when root privileges are required.
You probably want to run the gcutil tools as a non-privileged (i.e. not root) user on your local machine. The default GCE image is designed to encourage running only the commands you need to as root, and disables root login by default.
If you decide you want to login in directly as root, there are (brief) instructions at the above link.

How do I change the default password of MySQL root user on Cloudbees?

We are running Jenkins on Cloudbees for building our code base from Github repo for MifosX. For our Integration Test job, we need to create a MySQL DB before each run. We have been able to do that, but would like to change the default MySQL credentials which are "root" and blank password, to some specific "password". Can someone guide us on how to do that?
I assume you are following this guide.
If that's the case, you should be able to follow standard MySQL instructions for setting the root users' password:
mysqladmin -u root password NEWPASSWORD
But I'm not sure why you would want to secure this with a password. Any network ports are isolated from other users, and they certainly don't have access to your files.

how to run jenkins as super user?

I am Mahesh.
I installed jenkins in my linux machine,IT works well as a normal user, When i try to run one script in super user [root] mode,It is not working properly,Even i disable the password in sudoers file it is not working and also It not giving any error It just running the script in normal user instead of root ?? what i do? how i can resolve this problem ??
I just add like this in shell script coloumn in jenkins...
sudo su //comment-->I disable the password so no password required ,I tested in the terminal and am able to enter into root without password with this
sh something.sh
I would advise against running Jenkins (or any application server) as the root user.
Instead of battling the sudo command, why not install the Jenkins ssh plugin and configure the jenkins user to perform an ssh login to the root account?