At 03:52 AM 5/26/2004, you wrote: >I previously posted a problem where a job failed attaching to an MQ >Q Manager when run from cron. The explanation that was provided >was that because MQ authenticates the user using the NT services >and cron had had to su to that user, bypassing these services, that >the user running the job did not then have the correct credentials. > >This sounds plausible and certainly explains the behaviour I see, but >what would be involved in cron checking to see under which user the >cygwin session is running and if this is the same user as the cygwin >cron service is running under. If they are the same then do not do >the change of user? Would this enable the cron job to run with the >correct credentials? Or am I totally misunderstanding the problem? >I admit that I know little or nothing about either Windows security >or how cygwin interacts with it. > >Thanks for any comments on this
In the default installation, the user doing the "su" (as you refer to it) is the SYSTEM user. The SYSTEM user has no access to remote SMB shares. So your idea doesn't work because it assumes something that isn't true. One possible alternative is to run cron as the user you want to run jobs as. I don't recall, off-the-top-of-my-head, whether cron assumes that it will run as SYSTEM and, if so, this approach probably wouldn't work without changing the code. Another alternative might be to use a service which allows accessing remote directories without requiring Windows authentication (i.e. not SMB). -- Larry Hall http://www.rfk.com RFK Partners, Inc. (508) 893-9779 - RFK Office 838 Washington Street (508) 893-9889 - FAX Holliston, MA 01746 -- 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/