Charles, you nailed it. Major thanks. I owe you a bottle of wine or
something.

Yes, I was running Tomcat as a Windows service, and it should have dawned on
me that somehow that was part of the equation.

If I go ahead and run the Tomcat executable directly, the Samba access does
work *without *specifying "Guest OK = Yes". Because it's running as "me,"
and not some obscure Windows service account.

I think I'm going to continue to run the executable directly rather than as
a Windows service. Two reasons:

1. Only now do I realize that, when I was seeing the user.home property
showing up as C:\, that was a function of running as a Windows service. If I
just run as the current user, the expected user home gets used. Same for the
weird value I was seeing for user.name, which was *machine_name*$.

2. I literally can't solve this problem while still running as a Windows
service. If I go to "Configure Tomcat," a.k.a. tomcat6w.exe, neither my user
account nor any other account listed is selectable. Apparently, this is a
function of the account not being configured to "log on as a service." Now,
there is a "Local Security Policy" admin tool where you can configure
accounts to do just this. But that tool is only on Windows Vista
Professional, and the spare machine I'm using for Hudson builds has Windows
Vista Home.

Anyway, moral of the story: blame Windows.

On Sun, Dec 7, 2008 at 12:37 PM, Caldarale, Charles R <
[EMAIL PROTECTED]> wrote:

> > From: [EMAIL PROTECTED]
> > Subject: Tomcat vs. Samba
>
> > So basically, the credentials I input when mapping the
> > network drive get picked up when invoking Ant by hand
> > (scenario #2), but they don't get picked up when it is
> > Hudson running on Tomcat that is invoking Ant (scenario #3).
>
> Windows is notorious for caching SMB credentials and insisting on using
> those rather than ones explicitly given on the APIs.  We've gone round and
> round with this talking to the developers in Redmond, and they finally
> admitted they didn't really understand fully how it works or even all the
> different places credentials are hung on to.  No resolution has yet to be
> found.  (Perhaps that's why Vista has a completely new version of SMB
> implemented - although that's got its own set of problems.)
>
> All that being said, if you're running Tomcat as a Windows service, it is
> likely using the Local System Account, which may be getting sent on the SMB
> connection request.  You can try configuring the account you want Tomcat to
> use with the tomcat6w.exe program and see if that will connect with Samba on
> the Linux system.
>
> (Ignore Martin's response - he obviously didn't even figure out that you're
> running Tomcat on Windows, since he recommended starting it with sudo.)


MG: Hey, I'm grateful for any feedback I can get. [?]

>
>
>  - Chuck
>
>
> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
> MATERIAL and is thus for use only by the intended recipient. If you received
> this in error, please contact the sender and delete the e-mail and its
> attachments from all computers.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

Reply via email to