Net user domain password reset

Discussion in 'Scripting' started by stev379, Feb 15, 2005.

  1. stev379

    stev379 Guest

    I'm unable to change a domain password with Net User. I think it may be my
    syntax, but I'm not sure as I thought I had done this before and all the info
    I can find on Net user says my syntax is correct. How should this be setup?
    I'm getting error messages that "the option (/domain) is unknown".

    I'm logged on (XP machine in an AD domain) with an account that is able to
    change domain passwords and I'm testing with my own user account.

    Net User username password /domain
    stev379, Feb 15, 2005
    1. Advertisements

  2. That is the correct syntax.

    If username contains a space, it must be double-quoted.

    Net User "username" password /domain

    If password has a space, it must be double-quoted.

    Net User "username" "password" /domain

    Jerold Schulman
    Windows Server MVP
    JSI, Inc.
    Jerold Schulman, Feb 16, 2005
    1. Advertisements

  3. stev379

    stev379 Guest

    No spaces in the name or password. Below is the error copied from a command
    prompt window. Any idea what might cause such an error if my syntax is
    In the example below, "MYUSERNAME" is of course replaced with my actual
    username (ex. jsmith) and "DOMAIN" is replaced with the actual domain in the
    format of just the name and no dots (ex. microsoft instead of I don't have another domain I can test on at the moment.

    Microsoft Windows XP [Version 5.1.2600]
    (C) Copyright 1985-2001 Microsoft Corp.

    C:\>net user MYUSERNAME Pa55word /DOMAIN
    The option /DOMAIN is unknown.

    The syntax of this command is:

    [username [password | *] [options]] [/DOMAIN]
    username {password | *} /ADD [options] [/DOMAIN]
    username [/DELETE] [/DOMAIN]

    More help is available by typing NET HELPMSG 3506.

    stev379, Feb 16, 2005
  4. You shouldn't replace /domain with /<domainname> as you describe.
    Simply use "/domain" as the option. This command automatically uses
    the current domain.

    Corné Bogaarts, Feb 18, 2005
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.