Re: Problem with installing crontab on Cygwin(1.5.11/1005.11.0.0)/WinXP SP2
On Tue, 2 Nov 2004, Barry Kelly wrote: > I'm getting the following error when trying to install a crontab on my > account: > > $ crontab -e > # editing my crontab here... > chown: Invalid argument > > I've tried updating my passwd (I live on a Win2K server domain) file > in case it was out of date or missing local users (vs domain users), > using > > $ mkpasswd -d -l -g > /etc/passwd > > In case it makes a difference, my home directory does not correspond > to my username, so I edited the passwd file just after running > mkpasswd. However, I still get the same problem. I've tried fiddling > with the ownership of /var/cron/tabs in case that was a problem, but I > then got "access denied" errors, so I backed off. > > Cron is currently running on my system, and was installed with: > > ~$ cygrunsrv -I cron -p /usr/sbin/cron.exe -a -D > > I stopped and started it again after changing /etc/passwd. Process > Explorer tells me cron is running under the local SYSTEM account. > > I've run 'strace crontab saved' and inspected the output; the chown > syscall is returning -1, but it doesn't seem to give me any more > information. > > Any ideas? Check your /etc/group... Igor -- http://cs.nyu.edu/~pechtcha/ |\ _,,,---,,_[EMAIL PROTECTED] ZZZzz /,`.-'`'-. ;-;;,_[EMAIL PROTECTED] |,4- ) )-,_. ,\ ( `'-' Igor Pechtchanski, Ph.D. '---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow! "The Sun will pass between the Earth and the Moon tonight for a total Lunar eclipse..." -- WCBS Radio Newsbrief, Oct 27 2004, 12:01 pm EDT -- 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 installing crontab on Cygwin(1.5.11/1005.11.0.0)/WinXP SP2
On Wed, Nov 03, 2004 at 11:13:13AM -0500, Harig, Mark wrote: > > > > > > This did it. Group 18 (SYSTEM) was not in /etc/group; instead, > > > /etc/group only contained domain groups, not local groups. I ran > > > 'mkgroup -l -d > /etc/group' to recreate the file. > > > > Glad it's fixed. > > > > Hey Mark, care to add another test to cron_diagnose? > > (see sample in postinstall/exim.sh.done) > > > > Pierre > > > > As I reported earlier, there are already two tests for this. > > Please see lines 254 through 272 of version 1.7 > of cron_diagnose.sh. I must be misunderstanding this > problem because I cannot see why these tests do not > detect the error condition. The existing tests check the group of the crontab file. The problem reported here is that gid 18 was missing from /etc/group file. It is possible that it was accidentally deleted after the crontab file had been successfully created. Pierre -- 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 installing crontab on Cygwin(1.5.11/1005.11.0.0)/WinXP SP2
> > > > This did it. Group 18 (SYSTEM) was not in /etc/group; instead, > > /etc/group only contained domain groups, not local groups. I ran > > 'mkgroup -l -d > /etc/group' to recreate the file. > > Glad it's fixed. > > Hey Mark, care to add another test to cron_diagnose? > (see sample in postinstall/exim.sh.done) > > Pierre > As I reported earlier, there are already two tests for this. Please see lines 254 through 272 of version 1.7 of cron_diagnose.sh. I must be misunderstanding this problem because I cannot see why these tests do not detect the error condition. --- -- 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 installing crontab on Cygwin(1.5.11/1005.11.0.0)/WinXP SP2
On Wed, Nov 03, 2004 at 02:34:03PM +, Barry Kelly wrote: > On Wed, 3 Nov 2004 09:24:37 -0500, Pierre A. Humblet > <[EMAIL PROTECTED]> wrote: > > > > crontab chowns the crontab file group to 18. Make sure that gid 18 > > is in /etc/group. Also I find it hard to believe that the strace you > > got gives no useful information. > > This did it. Group 18 (SYSTEM) was not in /etc/group; instead, > /etc/group only contained domain groups, not local groups. I ran > 'mkgroup -l -d > /etc/group' to recreate the file. Glad it's fixed. Hey Mark, care to add another test to cron_diagnose? (see sample in postinstall/exim.sh.done) Pierre -- 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 installing crontab on Cygwin(1.5.11/1005.11.0.0)/WinXP SP2
> > On Wed, 3 Nov 2004 09:24:37 -0500, Pierre A. Humblet > <[EMAIL PROTECTED]> wrote: > > > > crontab chowns the crontab file group to 18. Make sure that gid 18 > > is in /etc/group. Also I find it hard to believe that the strace you > > got gives no useful information. > > This did it. Group 18 (SYSTEM) was not in /etc/group; instead, > /etc/group only contained domain groups, not local groups. I ran > 'mkgroup -l -d > /etc/group' to recreate the file. > This is strange. The cron diagnostic script makes two checks for this problem already. In the first test, it checks to see that the cron table has group ownership set to 'SYSTEM', and in the second test, it checks to see that the cron table's group owner ID number is '18'. It assumes that 'id -un' reports your user name and that your cron table is /var/cron/tabs/[user name]. --- -- 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 installing crontab on Cygwin(1.5.11/1005.11.0.0)/WinXP SP2
On Wed, 3 Nov 2004 09:24:37 -0500, Pierre A. Humblet <[EMAIL PROTECTED]> wrote: > > crontab chowns the crontab file group to 18. Make sure that gid 18 > is in /etc/group. Also I find it hard to believe that the strace you > got gives no useful information. This did it. Group 18 (SYSTEM) was not in /etc/group; instead, /etc/group only contained domain groups, not local groups. I ran 'mkgroup -l -d > /etc/group' to recreate the file. Re strace: the strace gave (something like) this entry about the chown() call: 165 14525235 [main] crontab 2600 chown_worker: -1 = chown (tabs/tmp.002600,...) This didn't give me enough information to figure out the missing parameters. I believe crontab should print more verbose error output for its critical failures. Thanks for the tip. I would have found this out this evening if I had to; you saved me a good 30 minutes. Thanks again! -- Barry -- 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 installing crontab on Cygwin(1.5.11/1005.11.0.0)/WinXP SP2
On Wed, Nov 03, 2004 at 10:13:55AM +, Barry Kelly wrote: > On Tue, 2 Nov 2004 18:33:57 -0500, Harig, Mark wrote: > > I (Barry Kelly) wrote: > > > I'm getting the following error when trying to install a > > > crontab on my account: > > > > > > $ crontab -e > > > # editing my crontab here... > > > chown: Invalid argument > > > > Please run this diagnostic script. It will attempt to locate > > many types of common problems with cron on cygwin. > > > > http://sources.redhat.com/ml/cygwin/2004-07/msg00207.html > > > > Please read the output of the script carefully. If it finds > > problems, it suggests possible fixes, and it will also recommend > > steps to take if it is unable to detect any problems > > I did what it suggested: the errors it notified me were that > /etc/passwd and /etc/group needed to be marked +r. I did this (chmod > 0644). > > > For what it is worth, crond is working on both Win2K and WinXP for me. > > In the previous three installs of cygwin I did, it was working under > both Win2K and WinXP for me too. > > However, crond (specifically, the daemon) isn't part of the problem. > Crontab fails with the error message even if the service hasn't been > started. I'll download the source and trace through it some time this > evening local time (GMT+0). > > > The following commands should give you a simple, and possibly valid, > > password file: > > > > $ mv /etc/passwd /etc/passwd.save > > $ mkpasswd -l > /etc/passwd > > $ mkpasswd -d -u [your Windows user ID] >> /etc/passwd > > > > You would edit your entry then if you wanted to change your login > > shell, home directory, group, etc. > > Sure. Did this, but got no further. > > Thanks for the reply. BTW, I'm subscribed to this list and will be > until I get this error fixed, so there's no need to cc me. crontab chowns the crontab file group to 18. Make sure that gid 18 is in /etc/group. Also I find it hard to believe that the strace you got gives no useful information. Pierre -- 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 installing crontab on Cygwin(1.5.11/1005.11.0.0)/WinXP SP2
On Tue, 2 Nov 2004 18:33:57 -0500, Harig, Mark wrote: > I (Barry Kelly) wrote: > > I'm getting the following error when trying to install a > > crontab on my account: > > > > $ crontab -e > > # editing my crontab here... > > chown: Invalid argument > > Please run this diagnostic script. It will attempt to locate > many types of common problems with cron on cygwin. > > http://sources.redhat.com/ml/cygwin/2004-07/msg00207.html > > Please read the output of the script carefully. If it finds > problems, it suggests possible fixes, and it will also recommend > steps to take if it is unable to detect any problems I did what it suggested: the errors it notified me were that /etc/passwd and /etc/group needed to be marked +r. I did this (chmod 0644). > For what it is worth, crond is working on both Win2K and WinXP for me. In the previous three installs of cygwin I did, it was working under both Win2K and WinXP for me too. However, crond (specifically, the daemon) isn't part of the problem. Crontab fails with the error message even if the service hasn't been started. I'll download the source and trace through it some time this evening local time (GMT+0). > The following commands should give you a simple, and possibly valid, > password file: > > $ mv /etc/passwd /etc/passwd.save > $ mkpasswd -l > /etc/passwd > $ mkpasswd -d -u [your Windows user ID] >> /etc/passwd > > You would edit your entry then if you wanted to change your login > shell, home directory, group, etc. Sure. Did this, but got no further. Thanks for the reply. BTW, I'm subscribed to this list and will be until I get this error fixed, so there's no need to cc me. -- Barry -- 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 installing crontab on Cygwin(1.5.11/1005.11.0.0)/WinXP SP2
> > I'm getting the following error when trying to install a > crontab on my account: > > $ crontab -e > # editing my crontab here... > chown: Invalid argument > Please run this diagnostic script. It will attempt to locate many types of common problems with cron on cygwin. http://sources.redhat.com/ml/cygwin/2004-07/msg00207.html Please read the output of the script carefully. If it finds problems, it suggests possible fixes, and it will also recommend steps to take if it is unable to detect any problems For what it is worth, crond is working on both Win2K and WinXP for me. > I've tried updating my passwd (I live on a Win2K server domain) file > in case it was out of date or missing local users (vs domain users), > using > > $ mkpasswd -d -l -g > /etc/passwd > The following commands should give you a simple, and possibly valid, password file: $ mv /etc/passwd /etc/passwd.save $ mkpasswd -l > /etc/passwd $ mkpasswd -d -u [your Windows user ID] >> /etc/passwd You would edit your entry then if you wanted to change your login shell, home directory, group, etc. --- -- 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/