Guy is right about the dialog box popping up if NT does not already have
your password cached. You would need to have already logged in at that
point anyway. There are two ways to accomplish what you want (that I know
of):
1) If your web server is running as a service, you can typically configure
it to log in as a user at bootup time. To do this, open the "Services"
control panel and double-click on your web server service. You should then
be presented with the capability of logging the service in under a
particular account. This will allow the web server access to any resource
the corresponding user account has access to. It has been awhile since I
have used anything but IIS to do this sort of thing, so I don't remember if
it is the only web server capable of using this facility. In fact, so many
people had problems with this kind of thing before IIS 3.0, that they added
support for mapping virtual directories using particular account names as
of IIS 3.0. (Just look in Microsoft Internet Service Manager under WWW
properties.)
2) If for some reason you can't (or don't want to) use the above mechanism,
you can have NT automatically logon at boot up time. This is a less
elegant, but completely effective way of accomplishing what you want.
Obviously, there is a security risk in having a machine auto-logon, but if
you set the screen saver to be password protected and to pop up in 1
minute, you should be relatively safe. Anyway, to do it, you need to edit
the registry:
Under the key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows
NT\CurrentVersion\Winlogon, add a value named AutoAdminLogon. It must be
of type REG_SZ with the value 1. (Yes, REG_DWORD really would have been
better.) Then you need to have values for DefaultDomainName and
DefaultUserName, according to where and who you want to log in. Then add
another REG_SZ value named DefaultPassword containing the specified user's
password. Then logout, and your machine should auto-login as the specified
user.
Some little tidbits about this technique:
- It is obviously unsafe to have a clear text password in the
registry, so you should make this user essentially powerless beyond his
access to the web resources.
- When the time comes that you don't want the machine to auto-login,
hold down the shift key, and you will receive the normal bootup sequence.
You can do this when you log the user out as well, so that you can log in
to do whatever you want as a real user.
- As of NT 4 SP something, you can't auto-login as Administrator
(this is probably good anyway); it will work once, and then prompt you for
the password again. Basically, the AutoAdminLogon variable is changed to 0
when the Administrator auto logs on.
b/t/w, #2 is available somewhere on the MS knowledge base, I just don't
remember the article off the top of my head.
Hope this helps.
-Matt
On Tuesday, November 25, 1997 11:50 AM, Guy Harris [SMTP:guy@netapp.com]
wrote:
> > > and then worrying about drive N: being mapped to the right place by
the
> > > time the server starts up, feed it:
> > >
> > > \\FILERNAME\[WEBSHARE\]WWWROOT
> > >
> > > instead. This can make life much easier down the line.
> >
> > Where is the user authentication step done if I do this?
>
> As I remember, a dialog box pops up when you do that, if the system
> doesn't already have your password cached.
>
> I've no idea what happens if e.g. an NT service refers to a UNC name.