public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* crontab message "must be privileged to use -u"
@ 2020-03-18 19:54 Andrey Repin
  2020-03-18 20:21 ` Achim Gratz
  2020-03-20 16:08 ` Stephen Carrier
  0 siblings, 2 replies; 7+ messages in thread
From: Andrey Repin @ 2020-03-18 19:54 UTC (permalink / raw)
  To: All

Greetings, All!

I'm trying to use Cygwin's cron, but have a small issue:

# crontab -u 18 -l
must be privileged to use -u

Is there a way around the problem?
I'm in an elevated shell, but it seems crontab is doing a dumb POSIX check for
EUID=0.


-- 
With best regards,
Andrey Repin
Wednesday, March 18, 2020 22:51:54

Sorry for my terrible english...


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

* Re: crontab message "must be privileged to use -u"
  2020-03-18 19:54 crontab message "must be privileged to use -u" Andrey Repin
@ 2020-03-18 20:21 ` Achim Gratz
  2020-03-18 21:06   ` Andrey Repin
  2020-03-20 16:08 ` Stephen Carrier
  1 sibling, 1 reply; 7+ messages in thread
From: Achim Gratz @ 2020-03-18 20:21 UTC (permalink / raw)
  To: cygwin

Andrey Repin writes:
> I'm trying to use Cygwin's cron, but have a small issue:
>
> # crontab -u 18 -l
> must be privileged to use -u
>
> Is there a way around the problem?
> I'm in an elevated shell, but it seems crontab is doing a dumb POSIX check for
> EUID=0.

Then wrapping it with fakesu should work (no I have not tried that).


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

Factory and User Sound Singles for Waldorf Blofeld:
http://Synth.Stromeko.net/Downloads.html#WaldorfSounds

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

* Re: crontab message "must be privileged to use -u"
  2020-03-18 20:21 ` Achim Gratz
@ 2020-03-18 21:06   ` Andrey Repin
  2020-03-18 21:39     ` Achim Gratz
  0 siblings, 1 reply; 7+ messages in thread
From: Andrey Repin @ 2020-03-18 21:06 UTC (permalink / raw)
  To: Achim Gratz, cygwin

Greetings, Achim Gratz!

> Andrey Repin writes:
>> I'm trying to use Cygwin's cron, but have a small issue:
>>
>> # crontab -u 18 -l
>> must be privileged to use -u
>>
>> Is there a way around the problem?
>> I'm in an elevated shell, but it seems crontab is doing a dumb POSIX check for
>> EUID=0.

> Then wrapping it with fakesu should work (no I have not tried that).

Cool idea, but I'm not up for recompiling crontab >.>
Still, thanks for the reply.


-- 
With best regards,
Andrey Repin
Thursday, March 19, 2020 0:05:59

Sorry for my terrible english...


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

* Re: crontab message "must be privileged to use -u"
  2020-03-18 21:06   ` Andrey Repin
@ 2020-03-18 21:39     ` Achim Gratz
  2020-03-19  1:25       ` Brian Inglis
  0 siblings, 1 reply; 7+ messages in thread
From: Achim Gratz @ 2020-03-18 21:39 UTC (permalink / raw)
  To: cygwin

Andrey Repin writes:
>>> I'm in an elevated shell, but it seems crontab is doing a dumb POSIX check for
>>> EUID=0.
>
>> Then wrapping it with fakesu should work (no I have not tried that).
>
> Cool idea, but I'm not up for recompiling crontab >.>
> Still, thanks for the reply.

If you care to look at the package listing you might have noticed that
there is an actual fakesu binary present that I believe does exactly
what you were asking.


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

SD adaptations for KORG EX-800 and Poly-800MkII V0.9:
http://Synth.Stromeko.net/Downloads.html#KorgSDada

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

* Re: crontab message "must be privileged to use -u"
  2020-03-18 21:39     ` Achim Gratz
@ 2020-03-19  1:25       ` Brian Inglis
  2020-03-19  7:01         ` ASSI
  0 siblings, 1 reply; 7+ messages in thread
From: Brian Inglis @ 2020-03-19  1:25 UTC (permalink / raw)
  To: cygwin

On 2020-03-18 15:39, Achim Gratz wrote:
> Andrey Repin writes:
>>>> I'm in an elevated shell, but it seems crontab is doing a dumb POSIX check for
>>>> EUID=0.
>>
>>> Then wrapping it with fakesu should work (no I have not tried that).
>>
>> Cool idea, but I'm not up for recompiling crontab >.>
>> Still, thanks for the reply.
> 
> If you care to look at the package listing you might have noticed that
> there is an actual fakesu binary present that I believe does exactly
> what you were asking.

Installed libfakesu - fakesu just scans source for functions it can fake - it is
undocumented and not obvious how you are meant to run it.
One library function can implement suid/sgid exe permission bits.

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

This email may be disturbing to some readers as it contains
too much technical detail. Reader discretion is advised.

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

* Re: crontab message "must be privileged to use -u"
  2020-03-19  1:25       ` Brian Inglis
@ 2020-03-19  7:01         ` ASSI
  0 siblings, 0 replies; 7+ messages in thread
From: ASSI @ 2020-03-19  7:01 UTC (permalink / raw)
  To: cygwin

Brian Inglis writes:
> Installed libfakesu - fakesu just scans source for functions it can fake - it is
> undocumented and not obvious how you are meant to run it.
> One library function can implement suid/sgid exe permission bits.

Sorry, then I misremembered what it was for back from the discussion
when the package was introduced.  Come to think of it, such a wrapper
(however useful) would likely not easily be possible on Windows unless
it was drawing on some (not-yet-existing) facilities in the Cygwin DLL.


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

SD adaptation for Waldorf Blofeld V1.15B11:
http://Synth.Stromeko.net/Downloads.html#WaldorfSDada

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

* Re: crontab message "must be privileged to use -u"
  2020-03-18 19:54 crontab message "must be privileged to use -u" Andrey Repin
  2020-03-18 20:21 ` Achim Gratz
@ 2020-03-20 16:08 ` Stephen Carrier
  1 sibling, 0 replies; 7+ messages in thread
From: Stephen Carrier @ 2020-03-20 16:08 UTC (permalink / raw)
  To: cygwin

On Wed, Mar 18, 2020 at 10:54:51PM +0300, Andrey Repin wrote:
> Greetings, All!
> 
> I'm trying to use Cygwin's cron, but have a small issue:
> 
> # crontab -u 18 -l
> must be privileged to use -u
> 
> Is there a way around the problem?
> I'm in an elevated shell, but it seems crontab is doing a dumb POSIX check for
> EUID=0.

For me the way around this has been to view (or edit) directly the file
in /var/cron/tabs.  If you edit the file, cron needs to be restarted.

Stephen

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

end of thread, other threads:[~2020-03-20 16:08 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-18 19:54 crontab message "must be privileged to use -u" Andrey Repin
2020-03-18 20:21 ` Achim Gratz
2020-03-18 21:06   ` Andrey Repin
2020-03-18 21:39     ` Achim Gratz
2020-03-19  1:25       ` Brian Inglis
2020-03-19  7:01         ` ASSI
2020-03-20 16:08 ` Stephen Carrier

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