Unix Syslog not working properly - unix

I am using UNIX in cygwin (in Windows 7). I have a syslog.conf file consisting of this line initially:
*.* /var/log/messages
All information is logged to this "messages" file. Now when I changed the path to a new file (logtest):
*.* /var/log/logtest
I restarted the syslog-ng daemon, but the information is still getting logged to /var/log/messages
What could be the problem?

Related

I want to get a file from windows machine to unix machine using sshapss command

whn I try to connect windows server from my unix manually I am able to get the file .
sshpass -p "passwd" sftp username#hosname:path
get filnename unipath
I tired above lines manually and I am able to pull file to my unix path .When tried executing same commands via shell script its throwing below error. Can some one help me .
SSHPASS: Failed to run command: No such file or directory

Can't run psql with postgres running as launch daemon

This is the third time I'm setting up Postgres on a new machine (OS X 10.9 this time), and the third time I'm having problems with the connection.
Basically, I'm at the point where I've created a database cluster and can start postgres using:
postgres -D /usr/local/pgsql/data
But I want it to run in the background as a launch daemon, so I
sudo launchctl load -w /Library/LaunchDaemons/org.macports.postgresql91-server.plist
It seems like the daemon is launched successfully. But when I type psql I get the same old error message I've been dealing with every single time I try to set up Postgres:
psql: could not connect to server: No such file or directory. Is the server running locally and accepting connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
Any ideas on what might be causing this?
The psql you're running is the old version bundled by Apple in Mac OS X and added to the default PATH. Use the one from Homebrew, by fixing your path or entering the path specifically.
Alternately, explicitly connect to the server by overriding the default socket directory:
psql -h /tmp
See also:
this superuser answer
How to modify PATH for Homebrew?
Update:
In this case it looks like the server is genuinely not starting. Check the permissions on the data directory (apparently /usr/local/pgsql/data) and check the Console.app logs for relevant messages from launchd.
Update:
You must fix the permissions so the postgres user (or postgres_, depending on how you installed) has ownership. Check the launchd config file to see what user it runs as, and sudo chown -R postgres /usr/local/pgsql/data to change ownership. Replace postgres with postgres_ if that's what your launchd config says

Transfer Directory structure from Windows to AIX server

I have to transfer a folder structure from Windows to AIX server but I can not install anything more then Putty as this is client machine.
I have tried few alternative.
Tried to ftp Directory structure which is not possible as FTP support only simple file transfer
Tried to execute remote UNIX command execution with putty.exe -ssh -l username -pw password cmd_file.sh. cmd_file.sh is in local windows system contains shell commands but unzip not supported here. I also tried putty.exe -ssh -l username -pw password unix_command and got error "invalid port number"
I tried to execute a shell script file in unix server from windows, it didn't work either.
Make a tar file (using cygwin perhaps on Windows -- you do use cygwin, right?). Then ftp the tarball over. Untar, profit!

What cause the error "Couldn't canonicalise: No such file or directory" in SFTP?

I am trying to use SFTP to upload the entire directory to remote host but I got a error.(I know SCP does work, but I really want to figure out the problem of SFTP.)
I used the command as below:
(echo "put -r LargeFile/"; echo quit)|sftp -vb - username#remotehost:TEST/
But I got the error "Couldn't canonicalise: No such file or directory""Unable to canonicalise path "/home/s1238262/TEST/LargeFile"
I thought it was caused by access rights. So, I opened a SFTP connection to the remote host in interactive mode and tried to create a new directory "LargeFile" in TEST/. And I succeeded. Then, I used the same command as above to uploading the entire directory "LargeFile". I also succeeded. The subdirectories in LargeFile were create or copied automatically.
So, I am confused. It seems only the LargeFile/ directory cannot be created in non-interactive mode. What's wrong with it or my command?
With SFTP you can only copy if the directory exists. So
> mkdir LargeFile
> put -r path_to_large_file/LargeFile
Same as the advice in the link from #Vidhuran but this should save you some reading.
This error could possibly occur because of the -r option. Refer https://unix.stackexchange.com/questions/7004/uploading-directories-with-sftp
A better way is through using scp.
scp -r LargeFile/"; echo quit)|sftp -vb - username#remotehost:TEST/
The easiest way for me was to zip my folder on local LargeFile.zip and simply put LargeFile.zip
zip -r LargeFile.zip LargeFile
sftp www.mywebserver.com (or ip of the webserver)
put LargeFile.zip (it will be on your remote server local directory)
unzip Largefile.zip
If you are using Ubuntu 14.04, the sftp has a bug. If you have the '/' added to the file name, you will get the Couldn't canonicalize: Failure error.
For example:
sftp> cd my_inbox/ ##will give you an error
sftp> cd my_inbox ##will NOT give you the error
Notice how the forward-slash is missing in the correct request. The forward slash appears when you use the TAB key to auto-populate the names in the path.

Using UNC path with psexec does not work in remote connection

Hi I am trying to open a setup file in serverB in serverA that I am connecting to remotely. When I use the UNC path for folder in serverB the error message states that the network path is not found. I know that there is some security layer that is preventing me from doing this. I tried to map network drive n use that to open the installer but same error message comes up. This is the code. What is preventing me from opening this file? My guess is because I am double hopping is there credssp in psexec like in powershell that enables double hopping?
psexec -s \\serverA -u xxxlab\xx004 -p xxxxx -i 0 -d "\\serverB\npp.6.3.3.Installer.exe"

Resources