I have a EC2 instance running CentOS and PBX on a flash installed.
I can connect to server using SSH. I want to reset PBX passwords, so i run:
passwd-master
after following steps, i get an error at the end :
Your manual password was accepted!
passwd-master - 2.0.4 released on 082612
CentOS release 6.3 (Final) - 64 Bit
**********************************************************************
* Now applying new password to maint/meetme/wwwadmin *
**********************************************************************
Applying wwwadmin password
Applying maint password
Applying meetme password
httpd service restarted to apply new passwords!
passwd-master - 2.0.4 released on 082612
CentOS release 6.3 (Final) - 64 Bit - ARI PATCH
**********************************************************************
* Now patching main.conf.php *
**********************************************************************
Now verifying /var/www/html/recordings/includes/main.conf.php exists
ERROR the file /var/www/html/recordings/includes/main.conf.php DOES NOT EXIST
or is zero length. Unable to continue now exiting
I noticed i dont have permission to access this folder : "/var/www/html/recordings/includes/"
Then i tried to set password of "maint" only, and i got an error at the end again :
passwd-maint
-------------------------------------------
Set password for AMP web GUI and maint GUI
User: maint
-------------------------------------------
New password:
Re-type new password:
Updating password for user maint
htpasswd: unable to update file /usr/local/apache/passwd/wwwpasswd
And its because i dont have access to "wwwpasswd" (not even read permission)
I login using default EC2-user obviously.
My question is, how can i fix this problem and change passwords?
I tried to use : sudo su command
and then run passwd-master , but it doesnt work.
after i use sudo su command, it doesnt know passwd-master and passwd-maint anymore and i get
bash: passwd-master: command not found
error.
Any advise please?
If its not in the path, then you have to run it like this ./passwd-master while in the directory where the script exists. – datasage
Thank you datasage. using " ./ " solved my problem . i didn't know about it.
Related
I'm getting this error when trying to configure the knife plugin for Chef in an Ubuntu 14.04 instance on Google Cloud Platform. Any ideas on how to fix this?
FATAL: Cannot find subcommand for: 'osc_user configure -i'
There are 2 VMs - one is the chef-server and the other the chef-workstation, both are the same OS.
Source :- https://cloud.google.com/solutions/google-compute-engine-management-puppet-chef-salt-ansible-appendix#getting-started-with-chef-on-compute-engine
Chef-server VM IP - https://35.227.106.170/
Chef-workstation VM IP - https://35.231.42.82/
Here is the console log:
anjalithomas_mec#chef-workstation:~/.chef$ knife configure -i # server: https://[server's external IP address]:443, cookbook_path = ~/chef-repo
Please enter the chef server URL: [https://chef-workstation.c.chef-gcp-195115.internal/organizations/myorg] https://35.227.80.216
Please enter a name for the new user: [anjalithomas_mec] any
Please enter the existing admin name: [admin]
Please enter the location of the existing admin's private key: [/etc/chef-server/admin.pem]
Overwrite /home/anjalithomas_mec/.chef/credentials?? (Y/N) Y
Creating initial API user...
Please enter a password for the new user:
WARNING: IF YOU ARE USING CHEF SERVER 12+, PLEASE FOLLOW THE INSTRUCTIONS
UNDER knife user create --help.
You only passed a single argument to knife user create.
For backwards compatibility, when only a single argument is passed,
knife user create assumes you want Open Source 11 Server user creation.
knife user create for Open Source 11 Server is being deprecated.
Open Source 11 Server user commands now live under the knife osc_user namespace.
For backwards compatibility, we will forward this request to knife osc_user create.
If you are using an Open Source 11 Server, please use that command to avoid this warning.
NOTE: Backwards compatibility for Open Source 11 Server in these commands will be removed
in Chef 15 which will be released April 2019.
FATAL: Cannot find subcommand for: 'osc_user configure -i'
Looks like it's an open issue with no fix yet:
chef client - error during Knife configure -i #4814
https://github.com/chef/chef/issues/4814
I've a remote server where I host my projects. And I'm using my PhpStorm locally, so every time I save, it synchronizes automatically with the remote server.
However, I failed to configure PhpStorm to run PHPUnit on the remote server.
Under Configure Remote PHP Interpreter I fill out the right information (Host, User name, and Password).
The error I'm having is "Algorithm negotiation fail" when I validate and "Test SFTP Connection: Connection to 'id address' failed. Connection failed" when I try to specify the path of PHP interpreter.
How do I fix that ?
I had the same problem. I solved this problem by adding
KexAlgorithms curve25519-sha256#libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1
to /etc/ssh/sshd_config and after that, I restart sshd
sudo systemctl restart sshd
Just upgraded Ubuntu to 16.04 and encountered this issue, the "Algorithm negotiation fail" in PHPStorm 8.0.3.
The problem is with the jsch-0.1.51.jar library. If you overwrite the jsch-0.1.51.jar file with the latest from https://sourceforge.net/projects/jsch/ (currently jsch-0.1.54.jar) and restart, it should be fine. No need to add insecure algorithms to your ssh daemon.
As Guillaume Fache proposed, minimal configuration for PhpStorm is:
KexAlgorithms diffie-hellman-group1-sha1
but diffie-hellman-group1-sha1 use:
1) 1024 bits modulus - breakable, marked as insecure
2) SHA-1 - breakable, confirmed collision attack possibility
conclusion:
use public/private key pair - more secure and no needs to save or type password
edit this file :
sudo /etc/ssh/sshd_config
add this line :
KexAlgorithms diffie-hellman-group1-sha1
and restart :
sudo systemctl restart sshd
It works for me!
I did all this: http://dev.mysql.com/doc/refman/5.6/en/resetting-permissions.html
The mysqld is running in the command prompt and I can connect with the new password. But, the database is gone.
Luckily i found my root password again, and tried to login (with workbench) when the service is running normally with the "networkservice" user. Now I wonder why I can't change the password for the networkservice instance. It seems that the database is hooked up to that windows user.
I installed the mysql with the installation wizard.I have tried a lot of things, I cant reset the password for the MySQL 5.6 service running on Windows 8. I have tried running the reset as administrator in cmd, and it starts an instance in the command prompt, I can connect with the new password, but it's not the same as the MySql56 service...
I have tried to run start paramters in the service options, but it seems that windows are ignoring it when starting the services.
Any suggestions why?
I needed to change the defaults-file destination to the hidden folder: C:\ProgramData\MySQL\MySQL Server 5.6\my.ini
http://dev.mysql.com/doc/refman/5.1/en/option-files.html
Before I explain the issue I am having, need to let you know that I am totally new to CYGWIN and stuff like this.
My objective of installing SSH using CYGWIN is to setup Hadoop on windows 7 x64 machine. I am trying to execute the steps given on https://gist.github.com/tariqmislam/2159173. however I am not able to provide a blank password. Below is the log for same. Any help will be greatly appreciated.
$ chmod +r /etc/passwd
$ chmod u+w /etc/passwd
$ chmod +r /etc/group
$ chmod u+w /etc/group
$ chmod 755 /var
$ touch /var/log/sshd.log
$ chmod 664 /var/log/sshd.log
$ ssh-host-config
* Query: Overwrite existing /etc/ssh_config file? (yes/no) yes
* Info: Creating default /etc/ssh_config file
* Query: Overwrite existing /etc/sshd_config file? (yes/no) yes
* Info: Creating default /etc/sshd_config file
* Info: Privilege separation is set to yes by default since OpenSSH 3.3.
Info: However, this requires a non-privileged account called 'sshd'.
Info: For more info on privilege separation read /usr/share/doc/openssh/README.privsep.
Query: Should privilege separation be used? (yes/no) no
** Info: Updating /etc/sshd_config file
* Query: Do you want to install sshd as a service?
Query: (Say "no" if it is already installed as a service) (yes/no) yes
Query: Enter the value of CYGWIN for the daemon: []
Info: On Windows Server 2003, Windows Vista, and above, the
Info: SYSTEM account cannot setuid to other users -- a capability
Info: sshd requires. You need to have or to create a privileged
** Info: account. This script will help you do so.
* Info: You appear to be running Windows XP 64bit, Windows 2003 Server,
Info: or later. On these systems, it's not possible to use the LocalSystem
Info: account for services that can change the user id without an
Info: explicit password (such as passwordless logins [e.g. public key
** Info: authentication] via sshd).
* Info: If you want to enable that functionality, it's required to create
Info: a new account with special privileges (unless a similar account
Info: already exists). This account is then used to run these special
* Info: servers.
* Info: Note that creating a new user requires that the current account
* Info: have Administrator privileges itself.
* Info: No privileged account could be found.
* Info: This script plans to use 'cyg_server'.
* Info: 'cyg_server' will only be used by registered services.
* Query: Do you want to use a different name? (yes/no) no
* Query: Create new privileged user account 'cyg_server'? (yes/no) yes
* Info: Please enter a password for new user cyg_server. Please be sure
Info: that this password matches the password rules given on your system.
Info: Entering no password will exit the configuration.
Query: Please enter the password:
Query: Please enter the password:
Query: Please enter the password:
** Query: Please enter the password:
I can only recommend running hadoop in a linux virtual machine or native linux. Although successfully running hadoop 0.20.0 on windows xp+cygwin and windows7+cygwin, I once tried setting up a newer version of hadoop on windows7, but failed miserably due to errors in hadoop. IIRC hadoop with the security patch won't even run on windows7 because of problems with file permissons, etc.
So my advice: run hadoop on linux if you can, you'll avoid a serious amount of problems.
I followed steps in the following link and sshd installation and starting as service was working fine for me:
http://cloudcelebrity.wordpress.com/2012/01/16/configure-openssh-host-in-windows-using-cygwin/
PuTTY fatal error:
No supported authentication methods available
When I tried to login into the production server, I am getting above error. Could anyone help me to fix this?
Edit file
sudo vi /etc/ssh/sshd_config
Set PasswordAuthentication yes
Then restart server
sudo service ssh restart
sudo service sshd restart
It worked for me after I did the following steps :
1- Download Puttygen (https://www.puttygen.com/download-putty)
2- Open PUttyGen and then Load the private key from :
C:\Users[username]\Chapter6.vagrant\machines\default\virtualbox
3- save the new private key with a new name.
4- Open Putty, go to Connection > SSH > Auth > and add the new private key
5- Connect now using 127.0.0.1 and 2222
I think your private key file format is not compatible with putty for putty uses its' native format instead.
Detail:http://tartarus.org/~simon/putty-snapshots/htmldoc/Chapter10.html#errors-no-auth
If you are using cloud service and trying to connect server using ssh then Don't login the user name as ec2-user, the default user name is ubuntu forubuntu server.
This error can also be seen if you haven’t selected the .ppk file for the session in Putty: Connection > SSH > Auth
You’re done if you’ve employed PuttyGen to generate the keys. Else import the private key to your .ppk file as others have instructed.
Note on Linux as opposed to Windows, puttygen is accessed only via the command line. Here’s some resources for that:
https://the.earth.li/~sgtatham/putty/0.76/htmldoc/Chapter8.html#pubkey
http://manpages.ubuntu.com/manpages/bionic/man1/puttygen.1.html
https://www.ssh.com/academy/ssh/putty/linux/puttygen
In my case, I updated the Putty application to the latest and issue was solved.
Do you still have access to the server (maybe an open shell?) Check /var/log/messages for more details. This could have something to do with your PAM configuration.
Did you change folder permissions? i met this question in this week, so i find the error that is cause to me change the folder(name is ec2-user) permission.
1.Edit the /etc/ssh/sshd_config file.
2.Change PasswordAuthentication and ChallengeResponseAuthentication to yes.
3a. Restart ssh /etc/init.d/ssh restart.
OR
3b. better you use service sshd restart
If you've saved your public key on an external drive and it's not connected, putty will throw this error when connecting to your remote server.
Solved via Puttygen
I was on a windows system and it doesnt support direct shell access like linux or macOS.
Download Puttygen.
Load the .pem key to puttygen
Save as Private key
Use this key to login to ec2 instance
P.S : Also if the SSH ask for login/username - enter ubuntu or admin
Download Puttygen
Load the .pem key to puttygen
convert .pem file to .ppk
Save as Private key
Install/Open Putty >> puTTY Configuration >> Auth >> Browse >> path to .ppk file
Use this key to login to ec2 instance (check that IP of remote server is allowed in security group config of EC2 instance)
Username
The usual user names are ec2-user, ubuntu, centos, root, or admin
If that server is in the cloud like AWS, the rookie mistake I did was not realizing that a new Public IPv4 DNS gets used when the instance was off for some time. So, check the new DNS
Today I faced the same problem. So in putty you have to use "user name" of your EC2 instance
to get your "user name" of your EC2 instance
Select EC2 instance
select Connect
Now go to putty use ec2_name#public address
To see your public address
select EC2
under details you will be able to see your public address.
Now try loading your "ppk" file you will be able to log in.
For Digital Ocean, we should enable password authentication first.
The complete instruction is here: https://docs.digitalocean.com/support/i-lost-the-ssh-key-for-my-droplet/#enable-password-authentication
Log in to the Droplet via the Recovery Console
Even though you have a root password for the Droplet, if you try to log in via SSH using that password immediately, you’ll receive a Permission denied (publickey) error. This is because password authentication is still disabled on the Droplet. To fix this, you need to log in via the Recovery Console and update its SSH configuration.
There are detailed instructions on how to connect to Droplets with the
Recovery Console for a more explicit walkthrough, but here’s a brief
summary:
On the Droplet’s detail page, in the same Access tab, click the Launch
Console button.
At the login prompt, enter root as the username.
At the subsequent password prompt, enter the root password you were
sent via email. Most distributions prompt you to enter the password
twice, but some (like Fedora 27) do not.
Enter a new root password to replace the one that was emailed to you,
then enter that same new password again.
You will now be logged in as root in the Recovery Console, which gives
you access to the Droplet’s SSH configuration.
Enable Password Authentication To enable password authentication on
your Droplet, you need to modify a line in its SSH config file, which
is /etc/ssh/sshd_config.
Open /etc/ssh/sshd_config using your preferred text editor, like nano
or vim. Find the line that reads PasswordAuthentication no line and
change it to PasswordAuthentication yes, then save and exit the file.
Because the SSH daemon only reads its configuration files when it’s
first starting, you need to restart it for these changes to take
effect. The command to do this depends on your operating system:
Operating System SSH Restart Command
Ubuntu 14.x service ssh restart
Ubuntu 15.4 and up systemctl restart ssh
Debian systemctl restart ssh
CentOS 6 service sshd restart
CentOS 7 systemctl restart sshd
Fedora systemctl restart sshd\