[NTLUG:Discuss] Getting Linux and NT to play nice.
Joel Sinor
jsinor at comcast.net
Wed Apr 30 23:09:59 CDT 2003
I also recently found a policy in NT/2000 that tells it to process
autoexec.bat. I have not tried it.
I think the part that will be harder to deal with is if no one is
logging in then the net use command will have to supply a username and
password (since it will be being run as System, which is not a user
afaict).
I also have to wonder what your chosen backup software is. Many backup
packages will accept a unc \\servername\sharename as a path to dump to
or backup, and since they run as a user with a password, windows'
automagical passing of these things handles the login for you. It
sounds like you are using NT to back up the SCO machine, but if you are,
you could conceivably dump things to nt shares with smbclient on the
Linux box, or even on the sco box. But I smell disk space, software and
access issues in this story, as reasons why you rae doing it this way.
On Mon, 21 Apr 2003 13:04:40 -0500
Merlin <merlin at tacni.net> wrote:
> Quoting Kelledin <kelledin+NTLUG at skarpsey.dyndns.org>:
>
> > On Friday 18 April 2003 05:10 am, Stephen Klein wrote:
> > > My question is, does anyone know of a way to get WinNT 4 to
> > > connect to a SAMBA share automatically from a reboot without
> > > someone logging in first.
> >
> > Hmmm...I'm a little rusty on this. Somewhere in the registry,
> > deep under HKEY_LOCAL_MACHINE, is a subkey called "Run". I used
> > to know exactly where that was in the registry hierarchy (would
> > probably still know if I worked with windows more), but I do
> > remember that there's a "RunOnce" subkey right next to it. Just
> > do a registry search for "RunOnce" and it should get you there.
>
> Actually, the RUN key is only executed on interactive login. There
> is, however, a RunService or RunServices key that is executed on boot,
> and not interactive login.
>
> >
> > Stick an arbitrarily-named value in that subkey, with the data
> > being the path to some command, and IIRC that command will get
> > run on every boot, whether someone logs in or not.
> >
> > Once you've done that, the next thing is to create a batch file
> > that runs the necessary "net" commands to map the share to a
> > drive letter, then runs your backup operation and unmaps the
> > share before exiting. Then just stick the path to that batch
> > file in the "Run" subkey...
> >
> > Too bad I never learned much about the Windows "net" command line
> > tool. :(
>
> As long as the share does not require user validation, you can issue
> the NET command. The syntax would be:
>
> NET USE J: \\server\share
>
> Obviously, substitute whatever drive letter you want for J:
>
> --
> Merlin
> "Do not meddle in the affairs of Wizards,
> for they are subtle and quick to anger."
>
> _______________________________________________
> https://ntlug.org/mailman/listinfo/discuss
More information about the Discuss
mailing list