# Automatic NT Login from DOS

**URL:** <https://boards.straightdope.com/t/automatic-nt-login-from-dos/47673>\
**Category:** Factual Questions\
**Created:** [December 29, 2000, 4:54pm UTC](https://boards.straightdope.com/t/automatic-nt-login-from-dos/47673 "2000-12-29T16:54:53Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Maxwell\_Edison](https://avatars.discourse-cdn.com/v4/letter/m/f05b48/32.png) [@Maxwell\_Edison](https://boards.straightdope.com/u/Maxwell_Edison)\
**Post date:** [December 29, 2000, 4:54pm UTC](https://boards.straightdope.com/t/automatic-nt-login-from-dos/47673/1 "2000-12-29T16:54:53Z")

</div>

Can someone tell me the syntax to make a DOS machine log onto an NT server without manually typing in the username/password? I was under the impression it was “net logon password /user:domain\username /y”, but I have been unsuccessful so far.

---

<div class="post-metadata">

**Author:** ![Bricker](https://avatars.discourse-cdn.com/v4/letter/b/977dab/32.png) [@Bricker](https://boards.straightdope.com/u/Bricker)\
**Post date:** [December 29, 2000, 5:07pm UTC](https://boards.straightdope.com/t/automatic-nt-login-from-dos/47673/2 "2000-12-29T17:07:53Z")

</div>

> [@](#):
>
> \*Originally posted by Maxwell Edison \*  
> \*\*Can someone tell me the syntax to make a DOS machine log onto an NT server without manually typing in the username/password? I was under the impression it was “net logon password /user:domain\username /y”, but I have been unsuccessful so far.  
> \*\*

You can redirect the input from a text file. Say your password is ‘mugwump.’ Store the word wugwump in a text file called PASS.TXT on the root of C.

Have autoexec.bat include the line NET LOGON username \* \< PASS.TXT.

The \* forces the password question to be asked in the next line; and the redirect supplies the answer.

Ah, the good old days of MS LANMAN.

- Rick
