public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* System crontab with username containing a space
@ 2017-05-26  1:44 Gene Pavlovsky
  2017-08-24 19:20 ` Erik Soderquist
  2017-08-24 20:01 ` Brian Inglis
  0 siblings, 2 replies; 4+ messages in thread
From: Gene Pavlovsky @ 2017-05-26  1:44 UTC (permalink / raw)
  To: cygwin

Hey folks :)

Due to circumstances beyond my control, I've got a user account on a
remote PC which contains a space in the username, i.e. "Test
Computer".
I've set up Cygwin and cron, and am having problems with the system crontab.
I can't figure out how to put the username in there, I've tried it as
is, with \ escaping the space, enclosing in double quotes. The jobs
just don't get executed. There is no error message in cronevents. The
jobs are implementation of cron.hourly, cron.daily etc. - I really
don't want to put them in user's crontab which would contain more
personal stuff.

Does cron support spaces in username in the system crontab? If so, how
to escape them?

--Gene

--
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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: System crontab with username containing a space
  2017-05-26  1:44 System crontab with username containing a space Gene Pavlovsky
@ 2017-08-24 19:20 ` Erik Soderquist
  2017-08-24 22:07   ` Erik Soderquist
  2017-08-24 20:01 ` Brian Inglis
  1 sibling, 1 reply; 4+ messages in thread
From: Erik Soderquist @ 2017-08-24 19:20 UTC (permalink / raw)
  To: cygwin

On Thu, May 25, 2017 at 7:19 PM, Gene Pavlovsky
<gene.pavlovsky@gmail.com> wrote:
> Hey folks :)
>
> Due to circumstances beyond my control, I've got a user account on a
> remote PC which contains a space in the username, i.e. "Test
> Computer".
> I've set up Cygwin and cron, and am having problems with the system crontab.
> I can't figure out how to put the username in there, I've tried it as
> is, with \ escaping the space, enclosing in double quotes. The jobs
> just don't get executed. There is no error message in cronevents. The
> jobs are implementation of cron.hourly, cron.daily etc. - I really
> don't want to put them in user's crontab which would contain more
> personal stuff.
>
> Does cron support spaces in username in the system crontab? If so, how
> to escape them?

I ran into a similar issue where I had a space in a mount, and I had
to use some form of octal/hex encoding, but I no longer remember the
exact details...


I will try to reproduce this and see what I can find.

-- Erik




--
"I do not think any of us are truly sane, Caleb. Not even you. Courage
is not sanity. Being willing to die for someone else is not sanity."
... "Love is not sane, nor is faith." ... "If sanity lacks those
things, Caleb, I want no part of it."

-- Alexandria Terri in "Weaving the Wyvern" by Alexis Desiree Thorne

--
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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: System crontab with username containing a space
  2017-05-26  1:44 System crontab with username containing a space Gene Pavlovsky
  2017-08-24 19:20 ` Erik Soderquist
@ 2017-08-24 20:01 ` Brian Inglis
  1 sibling, 0 replies; 4+ messages in thread
From: Brian Inglis @ 2017-08-24 20:01 UTC (permalink / raw)
  To: cygwin

On 2017-05-25 17:19, Gene Pavlovsky wrote:
> Due to circumstances beyond my control, I've got a user account on a
> remote PC which contains a space in the username, i.e. "Test
> Computer".
> I've set up Cygwin and cron, and am having problems with the system crontab.
> I can't figure out how to put the username in there, I've tried it as
> is, with \ escaping the space, enclosing in double quotes. The jobs
> just don't get executed. There is no error message in cronevents. The
> jobs are implementation of cron.hourly, cron.daily etc. - I really
> don't want to put them in user's crontab which would contain more
> personal stuff.
> Does cron support spaces in username in the system crontab? If so, how
> to escape them?

With paths you backslash quote the space or other shell delimiter then enclose
the string in double quotes "Windows\ User".
Try that with the user name.
Anyone ever tried using the id instead of the name?
Failing that you will need to read the source.

-- 
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada

--
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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: System crontab with username containing a space
  2017-08-24 19:20 ` Erik Soderquist
@ 2017-08-24 22:07   ` Erik Soderquist
  0 siblings, 0 replies; 4+ messages in thread
From: Erik Soderquist @ 2017-08-24 22:07 UTC (permalink / raw)
  To: cygwin

On Thu, Aug 24, 2017 at 3:20 PM, Erik Soderquist wrote:
> I ran into a similar issue where I had a space in a mount, and I had
> to use some form of octal/hex encoding, but I no longer remember the
> exact details...
>
>
> I will try to reproduce this and see what I can find.

Well, I confirmed what I needed for the mounts was octal \040, so a
sample mount with a space would read:
/dev/device /mnt/dir\040with\040spaces/ ext4 default 0 0

and would mount under directory /mnt/dir with spaces/ correctly,
but so far I've been unable to get that working in cygwin's cron

however, to turn on full debugging of the cron daemon to /var/log/cron.log,
changing the service registry value for AppArgs from "-n" to
 "-n -x ext,sch,proc,pars,load,misc,test,bit" should give you every
scrap of logging available

I don't know if the failure on my machine is that it's corporate
policy controlled or I did something wrong or that cron doesn't use
\040 in the same way my mount test does.

-- Erik


--
"I do not think any of us are truly sane, Caleb. Not even you. Courage
is not sanity. Being willing to die for someone else is not sanity."
... "Love is not sane, nor is faith." ... "If sanity lacks those
things, Caleb, I want no part of it."

-- Alexandria Terri in "Weaving the Wyvern" by Alexis Desiree Thorne

--
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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-08-24 22:07 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-26  1:44 System crontab with username containing a space Gene Pavlovsky
2017-08-24 19:20 ` Erik Soderquist
2017-08-24 22:07   ` Erik Soderquist
2017-08-24 20:01 ` Brian Inglis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).