crontab message "must be privileged to use -u"

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

crontab message "must be privileged to use -u"

Andrey Repin
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...

--
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple
Reply | Threaded
Open this post in threaded view
|

Re: crontab message "must be privileged to use -u"

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


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
--
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple
Reply | Threaded
Open this post in threaded view
|

Re: crontab message "must be privileged to use -u"

Andrey Repin
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...

--
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple
Reply | Threaded
Open this post in threaded view
|

Re: crontab message "must be privileged to use -u"

Achim Gratz
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
--
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple
Reply | Threaded
Open this post in threaded view
|

Re: crontab message "must be privileged to use -u"

Brian Inglis
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.
--
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple
Reply | Threaded
Open this post in threaded view
|

Re: crontab message "must be privileged to use -u"

Achim Gratz
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
--
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple
Reply | Threaded
Open this post in threaded view
|

Re: crontab message "must be privileged to use -u"

Stephen Carrier
In reply to this post by Andrey Repin
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
--
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple