Limit for bash variable ?
Hello, I need to store some long strings in a bash variable, I'd like to know if there's a limit in length (last version of bash/cygwin 1.5). At the moment the string is 3.185 chars long. It's a temporary situation until I figure something better out. Regards, Nicolas -- Ce message a ete verifie par MailScanner pour des virus ou des polluriels et rien de suspect n'a ete trouve. -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Rsync (daemon) cannot see loopback connections IP address as 127.0.0.1
Hello, I'm trying to use rsync over SSH without the -e ssh option. The idea is to make rsync --daemon bind on the loopback on the Cygwin box and to connect to this box with a tunnel: ssh -L 873:localhost:873 u...@cygwin_box On the Cygwin Box, the file /etc/rsync.conf contains: [d_drive] read only = yes path = /cygdrive/d/ hosts allow = 127.0.0.1 To backup the Cygwin box, this simple command should do the trick: rsync -avz localhost::d_drive /path This is a simple use of a SSH tunnel. Unfortunately, on the cygwin box, rsync sees the loopback connection (from the SSH tunnel) from its own public IP address instead of 127.0.0.1. So the /etc/rsync.conf should be: [d_drive] read only = yes path = /cygdrive/d/ hosts allow = real_IP_address_instead_of_loopback_address It works but I'd like to backup a lot of Cygwin boxes and having to fill the hosts allow line with a non-generic static value is quite disturbing. How can I make rsync seeing local/tunnel connections as 127.0.0.1? Regards, Nicolas -- Ce message a ete verifie par MailScanner pour des virus ou des polluriels et rien de suspect n'a ete trouve. -- 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/
[resolved] Rsync (daemon) cannot see loopback connections IP address as 127.0.0.1
cuicui a écrit : Hello, I'm trying to use rsync over SSH without the -e ssh option. The idea is to make rsync --daemon bind on the loopback on the Cygwin box and to connect to this box with a tunnel: ssh -L 873:localhost:873 u...@cygwin_box On the Cygwin Box, the file /etc/rsync.conf contains: [d_drive] read only = yes path = /cygdrive/d/ hosts allow = 127.0.0.1 To backup the Cygwin box, this simple command should do the trick: rsync -avz localhost::d_drive /path This is a simple use of a SSH tunnel. Unfortunately, on the cygwin box, rsync sees the loopback connection (from the SSH tunnel) from its own public IP address instead of 127.0.0.1. So the /etc/rsync.conf should be: [d_drive] read only = yes path = /cygdrive/d/ hosts allow = real_IP_address_instead_of_loopback_address It works but I'd like to backup a lot of Cygwin boxes and having to fill the hosts allow line with a non-generic static value is quite disturbing. How can I make rsync seeing local/tunnel connections as 127.0.0.1? Mmmm, my SSH tunnel wasn't good, I did: ssh -L 873:cygwin_box:873 u...@cygwin_box instead of ssh -L 873:localhost:873 u...@cygwin_box Sorry about that, problem solved. Nicolas -- Ce message a ete verifie par MailScanner pour des virus ou des polluriels et rien de suspect n'a ete trouve. -- 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: SSH publickey problem, password works (Win 2003, OpenSSH_5.1p1, Cygwin DLL1.5.25 )
Just Me a écrit : I've been fighting with SSH for a week now, I've read everything I can google, it's finally time to ask for help. I can ssh to any account using a password, no problem. It bombs with a cannot seteuid error in the event log when I use a keypair. I had the same symptoms recently, I deleted all /etc/ssh_host_* files and did a ssh-host-config -y and discovered various permission problems on /var, /etc/passwd and /etc/group. This was on Windows XP. What you can do is: - net stop sshd - cyrunsrv -R sshd - rm -f /etc/ssh_host_* - ssh-host-config -y = might display some useful error messages I'm not familiar with sshd under Windows 2003 Server but this procedure fixes almost all my sshd issues with Windows XP. Regards, Nicolas -- Ce message a ete verifie par MailScanner pour des virus ou des polluriels et rien de suspect n'a ete trouve. -- 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: Updating cygwin from a remote shell?
Thomas Walker a écrit : Apologies if this is a newbie question... I did a decent amount of looking through mailing lists but couldn't find anything relevant. I'm a Linux/Unix person by hobby and profession and don't really do much Windows but my family (living in another state) is still rather Windows centric. A hard disk failure ago I decided to place a dirt cheap headless Linux box with mirrored raid on their network and setup cygwin on their Windows machines so that I could cobble together an easy backup solution based on cron, ssh, rdist, and fuse. That all works fine and has done so for some time. I'm a little bit of a security nut though (and sometime also want to be able to add new features for myself and for them) and would like to be able to easily update cygwin and/or install new packages onto the Windows/Cygwin boxes from a remote shell. I know I can setup VNC and all that fun stuff and run setup.exe but is there an easier way? The usual yum, apt, up2date, etc. don't seem to be options... I think that dpkg exists but you cannot update binaries that are running. If you are connected with ssh, the setup process will stop if it has to update bash, openssh, cygrunsrv and cygwin... Cheers, Nicolas -- Ce message a ete verifie par MailScanner pour des virus ou des polluriels et rien de suspect n'a ete trouve. -- 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: setup.exe command line parameters
Ralph Hempel a écrit : cuicui wrote: You need to modify the setup.ini file, create virtual (empty) package that belongs to the Base category and make all the additional packages you want dependant of this virtual package by filling the requires field. Ok, so how do you keep the setup.ini from being downloaded every time you connect to the server? Mmm, I'm not sure there's an overlay mechanism, in my case I basically append the virtual package text at the end of the setup.ini everytime I collect a fresh package list. My plan is to have a c:\cygwinSetup directory on my local server, where I have the latest and greatest packages I need, and then on each machine (usually vmware machines) that I need to install on, I have a possibly different set of needs besides Base. So one set of scripts grabs all the packages we need to the server, and the other set of scripts builds the cygwin installation on the local machines. This reduces the overall load on the mirrors. I guess I'm actually implementing a local mirror for the packages, now that I think about it. Is there a way to limit the scope of the packages that I choose to mirror locally? Maintaining a mirror simply consists in keeping the installation files in one place and sticking to a mirror for more convenience (otherwise a new directory named by the mirror URL is created in the repository). The setup scopes the packages by itself as far as it's only downloading the packages you choose to install (+ the base packages). Regards, Nicolas -- 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: setup.exe command line parameters
Ralph Hempel a écrit : With all of the talk about setup package selection and install procedures, I have a little story. One of the things I do for fun is write replacement firmware for the LEGO MINDSTORMS NXT - specifically pbLua. I needed an easy way to build the ARM7 cross compiler, and to locate and program the NXT via libusb. More importantly, I needed to share how to build it, which I have not yet done. Long story short, I ended up using a hacked older version of setup.exe that accepted a -p parameter and a list of packages. It worked great! Is there a compelling reason why that patch can't be applied to the current setup and released? Are there security or stability issues I'm not thinking about? That being said, I CAN run setup.exe in unattended quiet mode and get a BASE cygwin install done, and I'm quite happy with that. But I'd really, really like to specify packages on the command line. Can I help by offering to update the patch to the current setup? You need to modify the setup.ini file, create virtual (empty) package that belongs to the Base category and make all the additional packages you want dependant of this virtual package by filling the requires field. That's a known-working workaround i'm using for quite a long time. All the best, Nicolas -- 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 DNS lookup utility
David a écrit : The GNU host command is a useful DNS lookup utility. Is the host command available in cygwin? (Cygwin does not install it by default) If the host utility is available in cygwin, which cygwin package should I install to have it? otherwise, is there are simple host alternative in a cygwin package? (console application, not a graphical user interface) You can use the offical Bind binary kit for windows: http://www.isc.org/index.pl?/sw/bind/view/?release=9.5.0 It contains the server side of Bind but also the client utilities (dig, host, etc.) You can extract the binaries you interested in and make a personalized cygwin package called bindtools out of it. Be careful, the host.exe and dig.exe need some weird other binaries files such as the *.manifest files (i'm speaking of version 9.4.x, i did not try 9.5.x yet). These is the content of my bindtools-9.4.2.tar.bz2 archive: bin/bindevt.dll bin/BINDInstall.exe bin/dig.exe bin/host.exe bin/libbind9.dll bin/libdns.dll bin/libeay32.dll bin/libisc.dll bin/libisccc.dll bin/libisccfg.dll bin/liblwres.dll bin/mfc80.dll bin/mfc80u.dll bin/mfcm80.dll bin/mfcm80u.dll bin/Microsoft.VC80.CRT.manifest bin/Microsoft.VC80.MFC.manifest bin/Microsoft.VC80.MFCLOC.manifest bin/msvcm80.dll bin/msvcp80.dll bin/msvcr80.dll bin/nslookup.exe Regards, Nicolas -- 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 DNS lookup utility
Mark Geisert a écrit : If the host utility is available in cygwin, which cygwin package should I install to have it? You can use the offical Bind binary kit for windows: [...] Be careful, the host.exe and dig.exe need some weird other binaries files such as the *.manifest files (i'm speaking of version 9.4.x, i did not try 9.5.x yet). Why inflict the weird other binaries on the OP? The vanilla Bind 9.4.2 (and likely later) package from ISC builds OOTB with Cygwin. Because building and testing a bindtools package from the official source code and sharing it to the community sounds like the job of a Cygwin package maintainer ;) If anyone volunteers to do that, I'll be more than pleased to use an official Cygwin package of Bind instead of doing some dark magic to make it work. In the meanwhile I prefer using the binary kit provided by ISC. Regards, Nicolas -- 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 DNS lookup utility
Christopher Faylor a écrit : If the host utility is available in cygwin, which cygwin package should I install to have it? You can use the offical Bind binary kit for windows: [...] Be careful, the host.exe and dig.exe need some weird other binaries files such as the *.manifest files (i'm speaking of version 9.4.x, i did not try 9.5.x yet). Why inflict the weird other binaries on the OP? The vanilla Bind 9.4.2 (and likely later) package from ISC builds OOTB with Cygwin. Because building and testing a bindtools package from the official source code and sharing it to the community sounds like the job of a Cygwin package maintainer ;) If anyone volunteers to do that, I'll be more than pleased to use an official Cygwin package of Bind instead of doing some dark magic to make it work. In the meanwhile I prefer using the binary kit provided by ISC. Any reason why you can't volunteer? It's not that hard. Thanks for the offer but even if I build linux stuff on my own because official packages don't meet my requirement, I'm not a developer so I don't think I'm qualified for these (I think this is a dev job more than a sysadmin thing). Regards, Nicolas -- 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: net use (and net config)
Grant Edwards a écrit : On 2008-01-16, Grant Edwards [EMAIL PROTECTED] wrote: I'm running Cygwin sshd on a WinXP-Pro machine. When I ssh-in using a password, I can map drives with net use. When I set up an authorized_keys file so I don't have to enter a password, net use stops working: I get a system error 5 access denied, and it appears to be generated by the machine where the net use is being run, not by the SMB server (it never sees a request). [...] Is there any way to get mapped drives and public-key authentication working together? Perhaps I should add that the problem doesn't exist under Win2K: net use works fine regardless of the ssh authentication method. This is a bit offlist but maybe that's because under Windows 2000, network drives are available for the whole system once mounted. With Windows XP, the very same function used to map a network drives jailed them in the current userland. It means that you can have the same (network) drive letter assigned multiple times, one in each userland. This is particularly painful when running programs that elevate their privileges as far as the elevated process is not aware of the network drives of the user... FYI, the net config workstation command isn't working from a ssh shell. Nicolas -- 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: Starting native windows GUI app via ssh.
Clayton Holloway a écrit : Brian Keener wrote: Clayton Holloway wrote: Sounds good to me. I doubt this is a standard ssh option so I wouldn't know what to add in the config. Would you mind pasting the config that enables this or, if you don't remember which config option it is, the whole sshd_config. I believe they are referring to Start - Settings - Control Panel - Administrative Tools - Services: Depending on windows version there might not be a need for administrative functions above but once in services - look at the sshd services options and on tab 2 (log in) there will be a check box for interact for desktop. Sweet, it worked. and to think it was something as simple as a check box in a windows dialog box. And if you're a more registry kind of person or if you want to script it, this is the value to alter: [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\sshd] Type=dword:0110 Cheers, Nicolas -- 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/
reg.exe vs. regtool behaviour
Hi, I have a quick question about queries on the registry, reg.exe and regtool don't return the same format for the same value (respectively hexadecimal and decimal): reg query HKLM\SOFTWARE\Intel\LANDesk\VirusProtect6\CurrentVersion /v ProductVersion Returns: ProductVersion REG_DWORD 0x177a03f8 And regtool.exe -q get /HKLM/SOFTWARE/Intel/LANDesk/VirusProtect6/CurrentVersion/ProductVersion Returns: 393872376 I'm interested in the hex value because it is useful to get the version of Symantec Antivirus: 0x177a (1016 = v10.1.6), 0x03f8 (patch 6010). I found a workaround with bc to obtain the hexadecimal value directly: regtool -q get /HKLM/.../ProductVersion | sed -e s/^/obase=16;/ | bc But I'm wondering what's the rule here? Is regtool always returning decimal values for REG_DWORD type? Is it possible to have the hex value with regtool directly? All the best, Nicolas -- 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: How to remotely log in and execute a *GUI* program
Brian Mathis a écrit : in, Just to say that I found a partial solution, by copying the ssh login keys generated on Cygwin on the Windows box to the .ssh directory on the remote Linux box, and then executing from a local Cygwin xterm: DISPLAY=localhost:0.0 ssh -Y -C -q [EMAIL PROTECTED] command But is there a way to do it by running a Cygwin script on the Windows box? IIUUC, yes, just install the ssh server on your Cygwin/Windows box. The instructions are here: /usr/share/doc/Cygwin/openssh.README Regards, Gary There's not need for an SSH server on the Windows box. You only need the client, as the login is going from Windows to Linux. To execute a script instead of xterm, just run the script instead! :) In your command above, forget the DISPLAY stuff and put whatever the name of the command you want to run inside command. I'm recycling this thread to ask a similar question. Let's say that i have a windows box with sshd servicable on it. A can remotely launch command on the win box with ssh (ssh [EMAIL PROTECTED] command args). But what if the command is supposed to be a graphical program (in my case a popup created with AutoIt that display a message)? command is launched and running but nothing is displayed on the screen, the gui application is just running in background. Is there any way to make this program displaying on the current windows session? Note: in my case the ssh user is admin and the session user is user-only. Any help? All the best, Nicolas -- 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: How to remotely log in and execute a *GUI* program
Larry Hall (Cygwin) a écrit : I'm recycling this thread to ask a similar question. Let's say that i have a windows box with sshd servicable on it. A can remotely launch command on the win box with ssh (ssh [EMAIL PROTECTED] command args). But what if the command is supposed to be a graphical program (in my case a popup created with AutoIt that display a message)? command is launched and running but nothing is displayed on the screen, the gui application is just running in background. Is there any way to make this program displaying on the current windows session? Note: in my case the ssh user is admin and the session user is user-only. Any help? Reinstall 'sshd' specifying the '-i' flag to 'cygrunsrv' or edit the current service under Administrative Tools-Services and check Allow service to interact with desktop in the Log On tab of the service's Properties. Please note that this will display the program on the server, not the client. Yes, displaying on the server is the goal. Running X programs doesn't require this dance, though I assume you were referring to Windows apps. Yes, this is a windows app completely independant of Cygwin. Anyway, your trick is working like a charm, thanks a lot! Nicolas -- 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: Problem with setup.exe
David Kastrup a écrit : Hi, I have downloaded and non-installed a number of packages. Now I call setup.exe in a batch file with setup -n -N -d -A -L -q -R %CYGWIN_HOME% and this works in that it installs what is cached in the local directory, but!!! just the default minimal selection, not what I have additionally selected and fetched using setup.exe. Since this is part of an automated installation procedure, this is quite a nuisance. Is there any way to tell setup.exe what else to install when it _is_ already cached? Hi, Just add a virtual package in your setup.ini in the Base category that depends on the packages you need. I think there is no way to tell Cygwin to install every packages in the local directory on the command-line mode. Be careful, the setup.ini is erased with a fresh one each time you launch install from internet. Here is mine: @ bidon sdesc: Paquet bidon. category: Base requires: unzip zip gawk gzip tar sed ed vim perl python email mutt lftp openssh rsync less bzip2 wget patch cadaver autossh stunnel curl a2ps cron file ioperm lynx nano patchutils psutils shutdown tcp_wrappers time util-linux whois pcre ping zsh psmisc procps version: 0.0.1-1 source: ... You'll have to create the source: line with the size in byte and the md5sum of a fake package, in my example release/bidon/bidon-0.0.1-1.tar.bz2. It has to be a real file because setup.exe checks the md5 signature during the parsing of setup.ini. Nicolas -- 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: Problem with setup.exe
David Kastrup a écrit : cuicui [EMAIL PROTECTED] writes: David Kastrup a écrit : Hi, I have downloaded and non-installed a number of packages. Now I call setup.exe in a batch file with setup -n -N -d -A -L -q -R %CYGWIN_HOME% and this works in that it installs what is cached in the local directory, but!!! just the default minimal selection, not what I have additionally selected and fetched using setup.exe. Since this is part of an automated installation procedure, this is quite a nuisance. Is there any way to tell setup.exe what else to install when it _is_ already cached? Hi, Just add a virtual package in your setup.ini in the Base category that depends on the packages you need. I think there is no way to tell Cygwin to install every packages in the local directory on the command-line mode. Be careful, the setup.ini is erased with a fresh one each time you launch install from internet. Ok, I'll try to see whether I get this done. Basically, is there a problem with creating a complete fake setup.ini that just lists every package I have downloaded as belonging to category Base, with no dependencies? Switching the packages you need to the Base category should work. If it will get overwritten when installing from internet, there would not seem to be much of a problem, right? Yes, but you'll have to create the fake setup.ini from the original one each time you download packages from internet... I don't know what's you goal exactly, in my case, i create a fake/light setup.ini to maintain Cygwin on 250+ windows boxes in my university. Nicolas -- 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/
Rsync advices ?
Hi, I'm planning to use cygwin rsync on +150 windows clients to download from a rync server running on Debian. Is there any specific option i should use? There will be around 350Mo to sync the first time for each client and they will probably all connect at the same time, meaning the rsync server will run on his knee for a few hours... Besides using compression and bandwidth limitation, is there anything else available to optimize the process? All the best, Nicolas C. -- 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/
Automatic setup.ini generation/cleanup?
Hello, I'd like to speed up the setup.ini parsing during setup and i'm looking for a script to generate or clean a setup.ini regarding to a local packages directory. Is there any way simple to achieve that ? All the best, Nicolas -- Ce message a ete verifie par MailScanner pour des virus ou des polluriels et rien de suspect n'a ete trouve. -- 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/
/etc/setup/last-* files and quiet setup conflict (was: Where does Cygwin store its parameters?)
Dave Korn wrote: On 04 December 2006 11:04, Dave Silvia wrote: Hi! I'm trying to write a script that knows what the user selected for parameters at installation. Are you sure this is the best way to achieve whatever end result you're using? Give us some more detail, maybe there's a better way without having to know this stuff. For example, What type of line endings (CRLF, LF, etc.). Where does Cygwin store this sort of information, if anywhere? The type of line-endings can be inferred from the mount-mode of the root directory; it's not stored explicitly anywhere AFAIK. Most of the remaining information is stored in /etc/setup/last-{action,cache,connection,mirror}. BTW, i've recently planned to autoupdate the Cygwin environment (using switches of setup.exe and a virtual package on Base category) on the workstations i manage and i noticed that remaining /etc/setup/last-* files take precedence over the setup switches. In other words if the last action was Install from Internet and the setup switch is setup -L ..., the setup will try to download files from Internet instead of using the local directory only. That was an issue for me as far as my files are stored on a public SaMBa share (read only). Cleaning /etc/setup/last-* before setup files does the trick. Anyway, this was just to mention a possible minor bug. Another suggestion for quiet setup: no possibilities for the user to close the window (equivalent to the /qb! option of msiexec) when using the quiet option... All the best, Nicolas C. -- Ce message a ete verifie par MailScanner pour des virus ou des polluriels et rien de suspect n'a ete trouve. -- 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/