installing ssh using cygwin for hadoop - windows-7

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/

Related

How to configure the knife plugin for Chef on an Ubuntu 14.04 VM Instance using GCP

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

ora-09925 unable to create audit trail file no such file or directory

I have just installed a oracle 12c 12.1.0 DB on a linux machine.
after completing the installation i tried to login to database as sysdba
[oracle#bjorn adump]$ sqlplus sys as sysdba/welcome
SQL*Plus: Release 12.1.0.2.0 Production on Wed Oct 12 16:41:17 2016
Copyright (c) 1982, 2014, Oracle. All rights reserved.
Enter password:
Connected to an idle instance.
Now i tried to startup the DB using below command
SQL> startup mount
ORA-09925: Unable to create audit trail file
Linux-x86_64 Error: 2: No such file or directory
Additional information: 9925
and this error pop up !
my ENV variable are --
[oracle#bjorn adump]$ echo $ORACLE_BASE
/oracle
[oracle#bjorn adump]$ echo $ORACLE_HOME
/oracle/product/12.1.0/db_1
I have checked into pfile which is $ORACLE_HOME/dbs/init.ora
there is the entry for audit file
audit_file_dest="/oracle/admin/orcl/adump"
I also go to this location and check if the folder exists or nt but the folder was there and it aleady has some files in it like
orcl_m000_21634_20161012143245012051143795.aud
there are lots of file with names like this.
I gave permission to this folder
chmod -R 755 /oracle/admin/orcl/adump
tried creating a new file using
touch afile
and file get created.
It also got connect to the idle session but when i tried to do a startup the error pops up !
Please suggest what i am overlooking here which needs to be corrected.
Usually this could happen because:
AUDIT_FILE_DEST is not writable(chown +w $AUDIT_FILE_DEST)
$ORACLE_BASE/admin/$ORACLE_SID/adump exists and is not writable
$ORACLE_HOME/rdbms/audit is not writable
PS: Make sure to check permissions for the oracle user
Also please check for disk space availability
In our case, one of the drives in one of our 2-node RAC servers was failing - the reason why the OS (Linux) limited anyone's access, including root, to read-only.
The amber light was suppose to turn on but it didn't. It only turned on when we restarted that particular node.
You also have 3 things to verify:
- As already mentionned, check free space with df -have
- Check if the file system are Read/Write or read-only: cat /proc/mounts
- Finally, you can check free inodes space with df -i
Detailled information can be found here: https://www.oracle-scripts.net/unable-to-create-audit-trail-file-read-only-file-system/

Execution of postgresql by a user with administrative permissions is not permitted

Win7. Postgres 9.3.
Every time I type "postgres" in cmd I get this error.
Created a new account without any admin rights and with "Log on as" rights and with correct directory access rights to postgres/data, then I set this account as the "Log on as" in the services menu, but I still get the same error.
update2017: I never found a solution to this.
For windows do this:
Start cmd.exe (administrator as you are)
Add postgres user:
net user postgres your_password /add
Start a cmd.exe using your new postgres account:
runas /user:postgres cmd.exe
You can validate you are login correctly using" whoami
Run postgres normally.
It is not clear from your question whether you are trying to start the Postgres service or "manually" start Postgres without having a Windows service registered.
Since 9.x Postgres does not require it's own Windows user account to run the service. It defaults to use the built-in "Network" account.
To start the Postgres service (if it has been correctly installed), simply use use
net start postgresql-9.3
(the actual name might be different)
If you did not register a Windows service you should start Postgres through pg_ctl.exe not through postgres.exe. pg_ctl.exe will drop any administrative privileges from the process when starting the server.
To start Postgres manually from the commandline use:
pg_ctl -w -D c:\Path\To\The\DataDirectory
assuming that the access rights to the data directory are setup correctly so that the current user has full access to the directory.
If you want to install/create the Windows service manually, you can also do this through the pg_ctl program:
pg_ctl register -N "postgresql-9.3" -D c:\Path\To\The\DataDirectory
Again the access rights to the data directory must be setup correctly.

Locked out of postgresql

createdb foo gives an invalid password for user (my username)
I can't login with
sudo psql
How do I reset my postgres user accounts?
Is it something I can do in the hba_conf file?
EDIT:
I was beginning a Postgres tutorial and wanted to have a fresh install. I ran
brew update
brew uninstall postgresql
brew install postgresql
pg_ctl -D some/path
createdb
This could be two things: you lost/misset the password, or Postgres might be configured in a way that prevents you from logging in.
Resetting the password:
Most of the time Postgres runs as user "postgres". Try su - postgres as root, and then run psql. If that doesn't work, you'll need to figure out what user postgres is running as, and su to that user. From there you can reset the password for the user. Also, make sure that your user is allowed to log in -- the default is to disable login for a new role .
Changing the configuration:
Find the pg_hba.conf file and edit it to permit password login. This file is usually loacted in /var/lib somewhere. On my Scientific Linux server its at: /var/lib/pgsql/9.2/data/pg_hba.conf, but on my Gentoo server its at /etc/postgresql-9.3/pg_hba.conf -- so locate pg_hba.conf might help you find it. This file is usually fairly well commented, and there is a manual page for it here: http://www.postgresql.org/docs/devel/static/auth-pg-hba-conf.html.

Change "PBX in a flash" passwords on EC2

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.

Resources