Re: Bash process hangs around forever after ssh disconnect
Thorsten Kampe wrote: That's the Windows/Cygwin emulation of a Unix fork. Should be the same as on Linux. I know that. I was pointing out that sshd goes away as expected but bash does not. Please read again what I wrote and try to understand it. Ok, I have re-read it and don't find anything that I failed to understand. Even on the 2nd or 3rd readings. In all likelihood you do NOT want sshd to kill your shell because you loose connection for a while. Let me repeat: you do NOT want that. Really? Should I call Red Hat, SUSE, Debian and Ubuntu and all the others and tell them they've been doing it wrong all these years? That's *exactly* how every Linux I've ever used works. You want the ability to reconnect to that session once the physical connection is reestablished. screen gives you that ability. I know about screen. I use it regularly. But screen is off-topic. Unless there is some way screen can re-connect to a dangling bash session; I thought screen could only re-connect to screen. If it has that ability I'd like to be educated to it. Some days ago I brought up a GUI session to a remote W2k3 box, ran task manager and almost fell out of my chair to see bash.exe listed nearly a dozen times. I thought the thing had been rooted or something. Surely there is some actual solution to this. It works splendidly on Linux. And when I am doing something critical that doesn't need to be interrupted, then our mutual friend screen is always there waiting. Can anyone offer some help? Please? Thanks, Michael -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: Bash process hangs around forever after ssh disconnect
Thorsten Kampe wrote: Screen is /not/ off-topic because it is the solution to your problem. If you are asking for a solution where you cannot use screen because it is not installed or because you forgot to run it before starting a shell then you should say so. Ok then, I want a solution where I cannot use screen because it is not installed or because I forgot to run it before starting a shell. There. Now will I get some help? Let's assume you could not run or forgot to run screen: a quick Google search for cygwin bash ssh zombie sessions leads to the conclusion that you're not the first one who noticed that. I attempted to Google the problem before I ever posted to this list. Evidently didn't have the right words. But even after reading the results of above, I still dont know... Is this a known problem for which there is a fix? Is this a known problem that no-one can fix? Is this a known problem that no-one is willing to fix? Well, probably you should use screen. I'm glad I have you to tell me what I should do. I feel so loved. Michael -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Bash process hangs around forever after ssh disconnect
I'm seeing this on several systems... I'm logging in to a W2k server via cygwin sshd and using Putty as my terminal emulator. If my ssh connection gets dropped for any reason the bash.exe process on the host just stays there forever. Also, anything I was running in bash (e.g. vim) will stay there forever. I'm having to use taskman to clean this up periodically. Anything that can be done about this? Thanks, Michael Hipp Heber Springs, Arkansas, USA -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: sshd: public key working, but can't get passwords working
Daniel Griscom wrote: At 7:32 PM -0500 7/29/07, René Berber wrote: Back to the original problem: did you use ssh-user-config? (I guess you did since you had to copy the public key). No; I'd thought that ssh-user-config was to configure an account that was to be an ssh client (e.g. one within which I'd use ssh to connect to another machine). I copied the public key from another workstation from which I've used ssh public key connections for a number of servers. What you reported about the log is simple, the password used is not correct... it should prompt you 3 times and then close the connection; or the configuration does not allow password authentication, let's check this last one: In /etc/sshd_config you should have: #PasswordAuthentication yes #PermitEmptyPasswords no #UsePAM no All three lines are present and commented out (as above). I thought you were trying to use public/private key authentication, not password authentication? If so, then the first line above needs to be uncommented and changed to 'no'. (Remember to keep a session open while you're testing changes, and any changes won't become live until sshd is restarted on the host.) I think you said you were using authorized_keys2 as the public key file, try using ~/authorized_keys (note the missing '2'). That would be something like: /home/daniel/.ssh/authorized_keys Or whatever username you're trying to login to. Michael -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: sshd: public key working, but can't get passwords working
Thorsten Kampe wrote: * Michael Hipp (Mon, 30 Jul 2007 08:36:48 -0500) Daniel Griscom wrote: At 7:32 PM -0500 7/29/07, René Berber wrote: Back to the original problem: did you use ssh-user-config? (I guess What you reported about the log is simple, the password used is not correct... it should prompt you 3 times and then close the connection; or the configuration does not allow password authentication, let's check this last one: In /etc/sshd_config you should have: #PasswordAuthentication yes #PermitEmptyPasswords no #UsePAM no All three lines are present and commented out (as above). I thought you were trying to use public/private key authentication, not password authentication? If so, then the first line above needs to be uncommented and changed to 'no'. No, password authentication and public are not mutually exlusive. The default is fine. I didn't say they were. But since he's trying to use public/private key authentication then he probably wouldn't want password authentication available as an attack vector. Check your auth logs sometime and notice how common are attacks against port 22 using dictionaries and common account names. Michael -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: rysnc under cygwin hangs and doesn't clean up its processes - please help - cygwin 1.5.24-2,
Joel Harrison wrote: Background - I'm trying to turn off my linux box and save some electricity by using rsync on windows to do my geographically redundant backup to my ISP (site5 - $5/110GB/mo) ... I'd rather not load up a resource hog VM to do it if I can avoid that... even DSL would be more of a resource hog than cygwin. Technical: rsync on cygwin always hangs. Works fine on CentOS. I've been looking into this issue for 5-10 hours so far. I can scp/ssh fine to the target with ssh keys installed or not, only rsync hangs. I read about piping issues in rsync on cygwin from years back, but it seems to me like perhaps they are not resolved? Just my hypothesis. I know this isn't much help but just thought I'd mention that I'm using rsync from Windows-Linux on a number of boxes with no problems. Some of them have very large file sets to transfer. It works. The problems with rsync, I think, were actually ssh problems and appear to have been long fixed. What exact command are you using to issue rsync? What's the O/S of the host and what version of rsync is it running? I've seen compatibility problems with different versions of rsync. Michael -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: Help needed to access cygwin sshd server (installed on windows) from remote client with putty under windows XP
shiliang Wang wrote: From: shiliang Wang [mailto:[EMAIL PROTECTED] Sent: Thursday, July 26, 2007 4:52 PM To: 'cygwin@cygwin.com' Subject: Help needed to access cygwin sshd server (installed on windows) from remote client with putty under windows XP Hi, I am new here, I just wonder if someone can help me to access a remote sshd server with a client machine installed with Putty? The remote server I tested is in the same lab. Since many people in this lab need to use this super computer, I try to install a cygwin sshd server on the super computer to make it a server. A: I have already done this part. When I typed “net start sshd”, it starts and “ssh localhost”, it asked me the password. After I gave it password, it said the connection has been established successfully. I followed the exact the step described by this link: http://pigtail.net/LRP/printsrv/cygwin-sshd.html. It included these steps mkpasswd -cl /etc/passwd mkgroup --local /etc/group B: I installed putty on another machine in the same lab, and tried to accessed this super computer. I never succeed. I inputted IP address of the super computer and keep all of the rest parameters default. It always said timeout. Never log on the server. Both super computer and putty are installed under windows XP professional. You probably need to open port 22 in the WinXP firewall. Michael -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
dotlockfile in cygwin?
Hello, Does the 'dotlockfile' utility exist somewhere in cygwin? (Or is there something else that offers similar functionality?) Couldn't find anything in Google. And the Search Packages function on the website appears to be down. Thanks, Michael -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: dotlockfile in cygwin?
Christopher Faylor wrote: On Mon, Jul 23, 2007 at 09:41:06AM -0500, Michael Hipp wrote: Couldn't find anything in Google. And the Search Packages function on the website appears to be down. The Search Packages function is not down and it reports that dotlockfile is not available in the cygwin distribution. Thank you. Trying the search again. It fails consistently if I search for lock but works if the search term is dotlockfile. The error is: 500 Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. It has been doing this consistently since yesterday from more than one machine. Does anyone know if there is some functionality similar to dotlockfile in some other utility? Thanks, Michael -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: More pipe problems (was Re: [Fwd: 1.5.11-1: sftp performance problem])
This solution is problematic as the Unisons avail with Cygwin are beta versions 2.9.2 or 2.10.2 whereas the latest stable unison is 2.9.1. Normally this wouldn't be a problem except these versions will not run with a 2.9.1 version at the other end (Unison seems somewhat unique in that regard - requiring the exact same version at both ends). And it's simply not always possible to control what version is available at the other end. Michael Adrian Corduneanu wrote: Hi All, One temporary solution is to use the Cygwin version of unison, rather than the native Windows version. The Cygwin unison package is available through setup, or can easily be compiled from sources in the Cygwin environment. Adrian Karl M wrote: Hi All... Back on Octber 4-6, Corinna, Chris and Bob Byrnes were discussing temporarily reverting some of the pipe changes until a better solution is found so that native unison and other native programs would work with pipes (with ssh for example) on XP SP2. With the release of the 1.5.12 cygwin1.dll, downgrading is no longer an option...there are dependencies that prevent rolling the dll back. Also, the cygwin1.dll version that temporarily solved the problem is no longer available through setup. Is a solution expected any time soon, or can the cygwin1.dll have a temporary fix until a better solution is found. Thanks, ...Karl -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/ -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/ -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: cygwin sshd will not run under McAfee VirusScan 8.0i
Dave Korn wrote: -Original Message- From: cygwin-owner On Behalf Of Rob S.i.k.l.o.s Sent: 19 November 2004 18:12 Should we: a) treat this as a McAfee bug and just let people search the mailing list archives until McAfee decides to fix it; b) treat it as a McAfee bug and automatically add -y McShield in ssh-host-config if that service exists; or c) investigate it as a possibly cygwin sshd bug; I'm a sysadmin[*]. The _first_ thing I do whenever I've got a new PC to install on the network is remove absolutely *every* single last piece of the godawful pile of garbage that is known as Norton/McAfee/Symantec. It's not just cygwin sshd: it causes random, unpredictable failures throughout any system that is unfortunate enough to have it installed. It is bloated and ugly and buggy, and it installs hooks into every corner of the OS, which has the effect of seriously destabilising the entire system. I can't see any point trying to accomodate it. It should be taken outside, lined up against the wall, and shot. Then stabbed. Then it should be kicked. _Then_ it should be tied to a porcupine and thrown in front of a speeding train. And even that's not a fraction as much as it _deserves_ to suffer. Oh, and it _never_ uninstalls itself properly. It leaves crud throughout the registry and filesystem. FCOL, it leaves these stupid auto-updaters installed and running even after the entire packages has been uninstalled. I usually have to go in and manually nuke the fragments. littleenglandI don't like it!/littleengland I thought I was the only one with that opinion of McNorton. If you simply must run AV, try something more civil like AVG. It at least as the virtue of mostly staying out of the way. Michael Hipp -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
LANG=1033
I just did a fresh install on a WinXP SP2 system. After PostgreSQL refused to run 'initdb' with some error like 1033 is an invalid parameter, I noticed that it has LANG=1033 in the environment. I checked several other Cygwin installations and none of them even have a LANG variable. Doing 'export LANG=' allowed initdb to run, but I'm wondering how I got this LANG variable and if I should get rid of it? And where to get rid of it? Any help appreciated, Michael Hipp -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: cygserver won't start (FAQ alert)[SOLVED]
Larry Hall wrote: True but you won't see a difference. When you say Task Scheduler, you mean the Windows service/utility, right? Just curious. There's the same issue with 'cron' and any service that runs under SYSTEM. It has no access to shares that require authentication to access. So you either need to make your shares accessible to everyone or run the service under your user name and only for your user. Not sure I understood all that. I have been attempting to run the scheduled task under the one-and-only username that ever accesses this box. (That's where the mapped network drives live.) So is it possible that re-installing as Everyone will fix it? I've been thoroughly stumped thus far as to why a bash script that runs fine from the command prompt misbehaves from task scheduler even tho running as the same user. Thanks, Michael -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: cygserver won't start
Alder wrote: Michael Hipp wrote:: Hello, I realize this topic was discussed at length quite recently but in all those posts I was not able to discern a solution. That would have been my original post that spawned that thread, Michael. In the end, it appeared to be related to my PATH variable contents. Can you post yours here so we can have a boo? From Command Prompt: C:\WINNT\system32;C:\WINNT;C:\WINNT\system32\wbem;C:\Python23 From bash: /usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/cygdrive/c/WINNT/system32:/cygdrive /c/WINNT:/cygdrive/c/WINNT/system32/wbem:/cygdrive/c/Python23 From cmd.exe run from within bash: C:\cygwin\usr\local\bin;C:\cygwin\bin;C:\cygwin\bin;C:\cygwin\usr\X11R6\bin;c:\W INNT\system32;c:\WINNT;c:\WINNT\system32\wbem;c:\Python23 Anything out of place? The only thing I can see is that /usr/X11R6/bin is in the path and there is no such directory. Any help appreciated, Michael -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: cygserver won't start
Brian Dessent wrote: Hmm. You should also check that /etc/cygserver.conf is readable by SYSTEM and that /var/log/cygserver.log is readable and writable by SYSTEM. You could always just do chown SYSTEM:root and chmod 644 on them if unsure, but I suspect they're fine. Well, you're on the right track. Adding -d to the cygserver options caused Event Viewer to come up with this: cygserver : PID 800 : starting service `' failed: redirect_fd: open (1, /var/log/cygserver.log): 2, No such file or directory. So I tried (numerous times) setting the perms both from bash and Windows to no avail. Tried deleting and re-creating the file. Here is a partial transcript: [EMAIL PROTECTED] /var/log $ rm cygserver.log rm: remove write-protected file `cygserver.log'? y $ touch cygserver.log $ chown SYSTEM:root cygserver.log $ chmod 644 cygserver.log $ ls -l cygserver.log -rw-r--r--1 SYSTEM root0 Sep 29 11:47 cygserver.log $ cygrunsrv -S cygserver cygrunsrv: Error starting a service: QueryServiceStatus: Win32 error 1062: The service has not been started. $ chmod 777 cygserver.log $ cygrunsrv -S cygserver cygrunsrv: Error starting a service: QueryServiceStatus: Win32 error 1062: The service has not been started. Error message in Event Viewer repeats the No such file or directory error. Would sure appreciate some ideas. One thing, when I installed this cygwin I checked the Install For Just Me option. Could this have anything to do with it? Thanks, Michael -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: cygserver won't start (FAQ alert)[SOLVED]
Igor Pechtchanski wrote: One thing, when I installed this cygwin I checked the Install For Just Me option. Could this have anything to do with it? Bingo. As I was reading your message, I thought he should check that he has system mounts. You've just confirmed that you don't. Re-mount all of your mounts as system, and your services will work. David, this is definitely an FAQ, but there is nothing in the FAQ about services (other than the how do I install snapshots entry). Should we add something along the lines: Why don't my services work? Most Windows services run as the SYSTEM user. If you installed Cygwin for Just Me, the SYSTEM user won't see the mount table. You need to re-mount all of your mounts as system for services to work. We could even include the recipe for remounting as system (e.g., from http://cygwin.com/ml/cygwin/2003-05/msg00487.html), or tell them to run setup.exe again and select All Users on the Install For screen (and use the Keep view, so that nothing gets upgraded accidentally). Thank you (all) ever so very much. I had no idea what it took to re-mount all your mounts as system but I did the {eval `mount -m | sed -e 's/ -u / -s /g' -e 's/$/;/'`} from the msg referenced above and it now works like a charm. (There are some occasional other users of this machine and I don't really want them to have access to something as powerful as cygwin so re-installing for all users was definitely not the preferred solution.) Hmmm. I wonder if this will help another installation where Task Scheduler jobs don't seem to have access to windows network drives. Worth a try. Thanks again, Michael -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
cygserver won't start
Hello, I realize this topic was discussed at length quite recently but in all those posts I was not able to discern a solution. I installed cygserver with 'cygserver-config'. But starting the service produces: cygrunsrv: Error starting a service: QueryServiceStatus: Win32 error 1062: The service has not been started. I can find nothing amiss in my paths. I did this exact same procedure only yesterday on a different W2k box with no problems whatsoever. Any help appreicated, Michael Hipp Heber Springs, Arkansas, USA -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: cygserver won't start
Brian Dessent wrote: Michael Hipp wrote: I realize this topic was discussed at length quite recently but in all those posts I was not able to discern a solution. I installed cygserver with 'cygserver-config'. But starting the service produces: cygrunsrv: Error starting a service: QueryServiceStatus: Win32 error 1062: The service has not been started. Look in /var/log/cygserver.log and your Windows Event Log for the cause. Thanks. /var/log/cygserver.log is empty. The only slightly helpful thing in the Event log looks like this: starting service `cygserver' failed: execv: 1, Operation not permitted. Any clue what this trying to tell me. Thank you, Michael Hipp -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: cygserver won't start
Brian Dessent wrote: Michael Hipp wrote: starting service `cygserver' failed: execv: 1, Operation not permitted. Any clue what this trying to tell me. What are the permissions and ownership for /usr/sbin/cygserver.exe? Windows reports Full Control for Everyone (including Read Execute). Current owner is me (MICHAEL\michael). I'm a member of Administrators on this box. Bash reports: -rwxrwxrwx1 michael Users 103424 Sep 4 22:18 cygserver.exe Thanks, Michael -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Command-line email?
Does cygwin have a simple command-line email tool to toss an email to an SMTP server (without having to configure and run a full-taco MTA)? Thanks, Michael -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Bugs in Rsync?
I'm trying to use Rsync to back up this system to a remote across the network. I'm butting my head against 2 probs: - When rsync is given a source of /, it absolutely refuses to descend into /cygdrive. It's as if the -x (one fs only) is set. - When rsync is given a source of /cygdrive/c/ it will attempt to read pagefile.sys (the NT swap file) and always reports an IO error and this causes it to change its behavior (doesn't quite die). It does this regardless of all-powerful exclusions that would cause it to skip over pagefile.sys. Even touching that file enough to realize to exclude it evidently causes it problems. Are these really problems or am I just missing something? Thanks. Michael -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Default Text File Type
Could someone explain the meaning and implications of the Setup option to select Default Text File Type ( DOS or Unix)? I couldn't find it in the FAQ or User's Manual. Thanks. -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Bash PATH via ssh
Hello, first post. From a remote machine I'm doing something like: ssh 192.168.0.150 'echo $PATH' All the path appears to be set to is the Windows system path. I've put path amendments into /.bashrc and ~/.bashrc. As well as in the bash.bashrc files in /etc. Where do I put the path statements so they have effect when invoked from ssh so I can get things like /bin into the path? (I've read man bash invocation and searched the mailing list archives.) Thanks, Michael -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/