MSFN Forum: net user password change w/ special characters - MSFN Forum

Jump to content



Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

net user password change w/ special characters Rate Topic: -----

#1 User is offline   algorithm0 

  • Newbie
  • Group: Members
  • Posts: 23
  • Joined: 17-February 05

  Posted 20 September 2005 - 08:48 AM

Here is what I am currently using in a batch file:

net user <username> <password>

my problem is that once in a while the password has special characters in it (like spaces, &, etc). It causes the command to set passwords different from what was intended. Is there a way to have such passwords using net user?


#2 User is offline   Noise 

  • Windows Guru
  • PipPipPip
  • Group: Members
  • Posts: 425
  • Joined: 27-February 04

Posted 20 September 2005 - 10:20 AM

I had this problem too. I couldn't find a way around it either. In the end I had to make the passwords simpler.

#3 User is offline   algorithm0 

  • Newbie
  • Group: Members
  • Posts: 23
  • Joined: 17-February 05

Posted 20 September 2005 - 10:23 AM

Nois3, on Sep 20 2005, 11:20 AM, said:

I had this problem too. I couldn't find a way around it either. In the end I had to make the passwords simpler.
<{POST_SNAPBACK}>


I think my way around this is to write a c++ program instead of a batch file.

#4 User is offline   algorithm0 

  • Newbie
  • Group: Members
  • Posts: 23
  • Joined: 17-February 05

Posted 20 September 2005 - 12:13 PM

here is a special trick i just figured out:

net user <username> "<password>"

works like magik.

#5 User is offline   HyperHacker 

  • Just plain nuts
  • PipPipPip
  • Group: Members
  • Posts: 473
  • Joined: 01-May 05

Posted 26 September 2005 - 03:19 PM

That works pretty much any time you need to type a parameter that has spaces in it. :)

#6 User is offline   algorithm0 

  • Newbie
  • Group: Members
  • Posts: 23
  • Joined: 17-February 05

Posted 27 September 2005 - 06:19 AM

Well I am not a big batch scripter, so help me out here. I know that when you call a program from a command line the OS sends the parameters as an array of strings to the program. So when I put quotes around ANYTHING at the command line, does the OS detect that and consider it one parameter, and hence the program itself receives it as one parameter? That would explain why I couldn't find ANY documentation regarding using quotes with the net user command.

#7 User is offline   HyperHacker 

  • Just plain nuts
  • PipPipPip
  • Group: Members
  • Posts: 473
  • Joined: 01-May 05

Posted 27 September 2005 - 05:03 PM

Yeah, as far as I know quote behaviour is standard to the OS, so it should do that for everything.

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2011 msfn.org
Privacy Policy