Crap. Oh well. It was a long shot.It prints the syntax of the command. Same as if I used the wrong syntax.
"The correct syntax of this command is . . . blah blah"
Yep, I was only talking about the password length, not the account length.LanMan only does allow <15 but for local user accounts, which is what the script is for, allows up to 127 characters.
I'm going to start digging for a solution because now I'm bothered that it's not working.
--TH13
***EDIT***
OK, I tried two things. The first is I disabled LMHashes in the registry. HKLM\system\currentcontrolset\control\lsa and changed the nolmhash value to 1.
Next I rebooted and went back to the command prompt.
Here is what I see:
Hmmm, my theory of the message being tied to LMhash being enabled was instantly killed. I went back and set the value to zero again. (then rebooted)C:\WINDOWS\system32>echo Y | net user test 123456789123456789 /add
The password entered is longer than 14 characters. Computers
with Windows prior to Windows 2000 will not be able to use
this account. Do you want to continue this operation? (Y/N) [Y]:
I then decided to pass the "Y" after the command thinking that it would bang it to the OS when the nag message appeared. Now, I simply added the | echo Y to the end of the statement and here is what I got:
Then I checked to see if the account was really there.C:\WINDOWS\system32>net user test 123456789123456789 /add | echo Y
Y
C:\WINDOWS\system32>
Looks like you're in business!!! What do they say about trying the easy things first? w00t!!C:\WINDOWS\system32>net user
User accounts for \\HORSE
-------------------------------------------------------------------------------
Administrator test TheHorse13
The command completed successfully.
C:\WINDOWS\system32>[/
PS
In your script, you'll have to add a CRLF so that the "Y" is actually entered and processed.
![]()





Reply With Quote