This is the mail archive of the
cygwin@cygwin.com
mailing list for the Cygwin project.
Re: cron and network drives
Corinna Vinschen wrote:
On Mon, Aug 18, 2003 at 02:25:03PM -0700, Andrew DeFaria wrote:
My understanding of accessing mount points (shares that have been
mounted to a drive letter) is that if you telnet or login (or
switchuser) in such a way as to have a passwordless login then mount
points are marked as unavailable. Further I understand that cron runs
as SYSTEM and switches user to the owner of the crontab. Thus a
passwordless login has occurred therefore mount points are
unavailable. Yet on hosta it works but on hostb it fails.
I don't pretend to understand how the SMB code in Windows works. It
seems to be different on different machines. On my machine `net use'
doesn't even bother to print any of the active shares when in a
passwordless session:
$ net use
New connections will not be remembered.
There are no entries in the list.
Corinna, you are responsible for the cron code right? I think you also
did a lot of the security stuff with inetutils, etc. Does cron do what I
thought, which is run as SYSTEM and switchuser in a passwordless manner
to the user of the crontab?
If so and it is also true that passwordless logins will not have access
to mapped drives then we still have a mystery here as to why it works on
one machine and not on the other.
One thought that I had is perhaps it has something to do Windows startup
scripts or login scripts. I've never really understood them well but
perhaps at one site the login script does an explicit net use t:
\\server\share whereas the other site doesn't. If such login scripts are
executed before the user physically logs into the system (IOW in the
same manner as services) then it would follow that the cron service
would also have visibility to the drive (the T drive in this case). I'll
have to ask our Windows guy...
But I can access shares from within a passwordless session if I create
the sharing inside of the session using `net use'. Well, sometimes.
And it's a bit tricky, since it only works when not using drive
letters (so I have to use the //server/share path for accessing the
share) and only if I specify the full user name including domain or
password server
respectively:
$ net use \\\\server\\share password /user:SERVER_OR_DOMAIN\\corinna
Well I was trying to spare you all the details of why I need access to a
drive letter but it involves a cron job that performs a Clearcase
command that invokes a bastardized version of Perl derived from
ActiveState Perl which requires Windows compliant pathnames to Perl
modules. Since this trigger of Perl can happen anywhere in the domain I
have been using a drive letter. Perhaps I can use a UNC path instead. I
guess I'll have to try it.
--
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/