Loading ...
Sorry, an error occurred while loading the content.
 

RE: [BATCH WORLD] Re: Add local uses

Expand Messages
  • Morris, Lamar
    All net based commands are accessed via net help net command. net help net user The syntax of this command is: NET USER [username [password | *] [options]]
    Message 1 of 6 , Aug 1, 2003
      All net based commands are accessed via net help net command.



      net help net user

      The syntax of this command is:





      NET USER [username [password | *] [options]] [/DOMAIN]

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

      username [/DELETE] [/DOMAIN]



      NET USER creates and modifies user accounts on computers. When used

      without switches, it lists the user accounts for the computer. The

      user account information is stored in the user accounts database.



      This command works only on servers.





      username Is the name of the user account to add, delete, modify, or

      view. The name of the user account can have as many as

      20 characters.

      password Assigns or changes a password for the user's account.

      A password must satisfy the minimum length set with the

      /MINPWLEN option of the NET ACCOUNTS command. It can have as

      many as 14 characters.

      * Produces a prompt for the password. The password is not

      displayed when you type it at a password prompt.

      /DOMAIN Performs the operation on a domain controller of

      the current domain.

      /ADD Adds a user account to the user accounts database.

      /DELETE Removes a user account from the user accounts database.



      Options Are as follows:



      Options Description

      --------------------------------------------------------------------

      /ACTIVE:{YES | NO} Activates or deactivates the account. If

      the account is not active, the user cannot

      access the server. The default is YES.

      /COMMENT:"text" Provides a descriptive comment about the

      user's account (maximum of 48 characters).

      Enclose the text in quotation marks.

      /COUNTRYCODE:nnn Uses the operating system country code to

      implement the specified language files for a

      user's help and error messages. A value of

      0 signifies the default country code.

      /EXPIRES:{date | NEVER} Causes the account to expire if date is

      set. NEVER sets no time limit on the

      account. An expiration date is in the

      form mm/dd/yy or dd/mm/yy, depending on the

      country code. Months can be a number,

      spelled out, or abbreviated with three

      letters. Year can be two or four numbers.

      Use slashes(/) (no spaces) to separate

      parts of the date.

      /FULLNAME:"name" Is a user's full name (rather than a

      username). Enclose the name in quotation

      marks.

      /HOMEDIR:pathname Sets the path for the user's home directory.

      The path must exist.

      /PASSWORDCHG:{YES | NO} Specifies whether users can change their

      own password. The default is YES.

      /PASSWORDREQ:{YES | NO} Specifies whether a user account must have

      a password. The default is YES.

      /PROFILEPATH[:path] Sets a path for the user's logon profile.

      /SCRIPTPATH:pathname Is the location of the user's logon

      script.

      /TIMES:{times | ALL} Is the logon hours. TIMES is expressed as

      day[-day][,day[-day]],time[-time][,time

      [-time]], limited to 1-hour increments.

      Days can be spelled out or abbreviated.

      Hours can be 12- or 24-hour notation. For

      12-hour notation, use am, pm, a.m., or

      p.m. ALL means a user can always log on,

      and a blank value means a user can never

      log on. Separate day and time entries with

      a comma, and separate multiple day and time

      entries with a semicolon.

      /USERCOMMENT:"text" Lets an administrator add or change the User

      Comment for the account.

      /WORKSTATIONS:{computername[,...] | *}

      Lists as many as eight computers from

      which a user can log on to the network. If

      /WORKSTATIONS has no list or if the list is *,

      the user can log on from any computer.



      NET HELP command | MORE displays Help one screen at a time.





































      -----Original Message-----
      From: Sam Wallace [mailto:guydep@...]
      Sent: Friday, August 01, 2003 4:35 AM
      To: batchworld@yahoogroups.com
      Subject: [BATCH WORLD] Re: Add loal uses



      Hi Nick,

      It was rather... interesting trying to look up the syntax of the NET
      USER command as the Windows Help function has all the other NET
      commands indexed, but not this one. I ended up going into the Windows
      2000 Command Reference Main Page and found it there. It does not
      allow you to do what you want for this one thing. Something else that
      is worth knowing on the topic is the AddUsers command from the
      Windows 2000 Resource Kit. It is not quite what you need, but you
      ought to be aware of it.

      Finally, I found CusrMgr, also from the Resource Kit. It looks like
      it will do exactly what you need done. Note that some of the syntax
      is case-sensitive. Please let us know if this works.
      ****
      net user student password /add /passwordchg:no /comment:"local
      account for students"

      cusrmgr -u student +s PasswordNeverExpires

      net user physadmin different-
      password /add /passwordchg:no /comment:"admin account for staff"

      cusrmgr -u physadmin +s PasswordNeverExpires

      net localgroup administrators physadmin /add
      ****
      Thanks,

      Sam

      ********************
      > All

      > I recently asked about adding a local user from the command line. I
      need to add two users, one just a user and the other to be an admin.
      The OS is win2k SP4.

      > Here's what I have so far:-

      > -------

      > net user student password /add /passwordchg:no /comment:"local
      account for students"

      > net user physadmin different-
      password /add /passwordchg:no /comment:"admin account for staff"

      > net localgroup administrators physadmin /add

      > -------

      > ...which is fine. All I need to do now is (via the command line) set
      > both accounts to 'password never expires'.

      > Any ideas?

      > TIA

      > Nick
      ********************************
      cusrmgr -u UserName [-m \\ComputerName] [{-r UserName | -d
      NewUserName}] [{-p | -P Password}] [-rlg OldGroupName NewGroupName] [-
      rgg OldGroupName NewGroupName] [-alg LocalGroupName] [-agg
      GlobalGroupName] [-dlg LocalGroupName] [-dgg GlobalGroupName] [-c
      Comment] [-f FullName] [-U UserProfile] [-n LogonScript] [-h HomeDir]
      [-H HomeDirDrive] [{+s | -s} Property]

      Where:

      -u UserName
      specifies the user account on which to perform the operation. This
      switch is case-sensitive: it takes a lower-case u.
      -m \\ComputerName
      specifies the name of the computer (machine) on which to perform the
      operation. The default is the local computer.
      User Functions
      -r UserName
      renames user specified with -u to NewUserName.
      -d UserName
      deletes user UserName.
      Resetting Password Functions
      -p
      sets a random password. This switch is case-sensitive: it takes a
      lower-case p.
      -P Password
      sets password to Password. This switch is case-sensitive: it takes a
      capital P.
      Group Functions
      -rlg OldGroupName NewGroupName
      renames local group OldGroupName to NewGroupName.
      -rgg OldGroupName NewGroupName
      renames global group OldGroupName to NewGroupName.
      -alg LocalGroupName
      adds user specified by -u UserName to local group LocalGroupName.
      -agg GlobalGroupName
      adds user specified by -u UserName to global group GlobalGroupName.
      -dlg LocalGroupName
      deletes user specified by -u UserName from local group
      LocalGroupName.
      -dgg GlobalGroupName
      deletes user specified by -u UserName from global group
      GlobalGroupName.
      SetProperties Functions
      -c Comment
      sets Comment property to Comment.
      -f FullName
      sets FullName property to FullName.
      -U UserProfile
      sets UserProfile property to UserProfile. This switch is case-
      sensitive: it takes a capital U.
      -n LogonScript
      sets LogonScript property to LogonScript.
      -h HomeDir
      sets HomeDir property to HomeDir. This switch is case-sensitive: it
      takes a lower-case h.
      -H HomeDirDrive
      sets HomeDirDrive property to HomeDirDrive. This switch is case-
      sensitive: it takes a capital H.
      +s Property
      sets property Property, where Property can be any of the following
      properties:
      MustChangePassword
      CanNotChangePassword
      PasswordNeverExpires
      AccountDisabled
      AccountLockout
      RASUser
      -s Property
      resets any of the properties that can be set with +s.
      Return Value
      CusrMgr returns 0 on success.






      Yahoo! Groups Sponsor



      ADVERTISEMENT

      <http://rd.yahoo.com/M=259538.3625325.4914071.1261774/D=egroupweb/S=17072085
      79:HM/A=1695348/R=0/SIG=11u38u3s2/*http:/hits.411web.com/cgi-bin/hit?page=13
      74-105951838331032> click here



      <http://us.adserver.yahoo.com/l?M=259538.3625325.4914071.1261774/D=egroupmai
      l/S=:HM/A=1695348/rand=601830813>


      To Post a message, send it to: batchworld@...

      To Unsubscribe, send a blank message to: batchworld-unsubscribe@...

      Your use of Yahoo! Groups is subject to the Yahoo!
      <http://docs.yahoo.com/info/terms/> Terms of Service.



      [Non-text portions of this message have been removed]
    • Michael Marquart
      lamar, do you have an idea why your posts are double spaced? ... -- Regards, Michael
      Message 2 of 6 , Aug 1, 2003
        lamar, do you have an idea why your posts are double spaced?

        On Fri, 1 Aug 2003 09:17:38 -0500, Morris, Lamar wrote:

        > All net based commands are accessed via net help net command.
        >
        >
        >
        > net help net user
        >
        > The syntax of this command is:

        --
        Regards,
        Michael
      • Morris, Lamar
        No it s always been a mystery this is the only site that comes out like this. I Adding some extra text to test a theory. Lamar ... From: Michael Marquart
        Message 3 of 6 , Aug 1, 2003
          No it's always been a mystery this is the only site that comes out like
          this. I
          Adding some extra text to test a theory.

          Lamar

          -----Original Message-----
          From: Michael Marquart [mailto:micm@...]
          Sent: Friday, August 01, 2003 9:45 AM
          To: batchworld@yahoogroups.com
          Subject: Re: [BATCH WORLD] Re: Add local uses


          lamar, do you have an idea why your posts are double spaced?

          On Fri, 1 Aug 2003 09:17:38 -0500, Morris, Lamar wrote:

          > All net based commands are accessed via net help net command.
          >

          >
          > net help net user
          >
          > The syntax of this command is:

          --
          Regards,
          Michael


          Yahoo! Groups Sponsor
          ADVERTISEMENT




          To Post a message, send it to:   batchworld@...

          To Unsubscribe, send a blank message to: batchworld-unsubscribe@...

          Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
        • Michael Marquart
          That one isn t double spaced. Looks like your theory works, whatever it may be. :) ... -- Regards, Michael
          Message 4 of 6 , Aug 1, 2003
            That one isn't double spaced. Looks like your theory works, whatever it
            may be. :)

            On Fri, 1 Aug 2003 09:51:26 -0500, Morris, Lamar wrote:

            > No it's always been a mystery this is the only site that comes out like
            > this. I
            > Adding some extra text to test a theory.
            >
            > Lamar
            >
            > -----Original Message-----
            > From: Michael Marquart [mailto:micm@...]
            > Sent: Friday, August 01, 2003 9:45 AM
            > To: batchworld@yahoogroups.com
            > Subject: Re: [BATCH WORLD] Re: Add local uses
            >
            >
            > lamar, do you have an idea why your posts are double spaced?
            >
            > On Fri, 1 Aug 2003 09:17:38 -0500, Morris, Lamar wrote:
            >
            >> All net based commands are accessed via net help net command.
            >>
            >> 
            >>
            >> net help net user
            >>
            >> The syntax of this command is:


            --
            Regards,
            Michael
          • Morris, Lamar
            It’s plain text instead of HTML. I’ll go change my preferences now. ☺ Lamar ... From: Michael Marquart [mailto:micm@aardvark.net.au] Sent: Friday, August
            Message 5 of 6 , Aug 1, 2003
              It’s plain text instead of HTML. I’ll go change my preferences now. ☺


              Lamar

              -----Original Message-----
              From: Michael Marquart [mailto:micm@...]
              Sent: Friday, August 01, 2003 9:58 AM
              To: batchworld@yahoogroups.com
              Subject: Re: [BATCH WORLD] Re: Add local uses


              That one isn't double spaced.  Looks like your theory works, whatever it
              may be. :)

              On Fri, 1 Aug 2003 09:51:26 -0500, Morris, Lamar wrote:

              > No it's always been a mystery this is the only site that comes out like
              > this. I
              > Adding some extra text to test a theory.
              >
              > Lamar
              >
              > -----Original Message-----
              > From: Michael Marquart [mailto:micm@...]
              > Sent: Friday, August 01, 2003 9:45 AM
              > To: batchworld@yahoogroups.com
              > Subject: Re: [BATCH WORLD] Re: Add local uses
              >
              >
              > lamar, do you have an idea why your posts are double spaced?
              >
              > On Fri, 1 Aug 2003 09:17:38 -0500, Morris, Lamar wrote:
              >
              >> All net based commands are accessed via net help net command.
              >>
              >> 
              >>
              >> net help net user
              >>
              >> The syntax of this command is:


              --
              Regards,
              Michael


              Yahoo! Groups Sponsor
              ADVERTISEMENT




              To Post a message, send it to:   batchworld@...

              To Unsubscribe, send a blank message to: batchworld-unsubscribe@...

              Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
            • Morris, Lamar
              This is interesting, does anyone know where to set up this option in Outlook Exchange. Lamar ... From: Morris, Lamar Sent: Friday, August 01, 2003 10:02 AM To:
              Message 6 of 6 , Aug 1, 2003
                This is interesting, does anyone know where to set up this option in Outlook
                Exchange.

                Lamar

                -----Original Message-----
                From: Morris, Lamar
                Sent: Friday, August 01, 2003 10:02 AM
                To: 'batchworld@yahoogroups.com'
                Subject: RE: [BATCH WORLD] Re: Add local uses

                It’s plain text instead of HTML. I’ll go change my preferences now. ☺


                Lamar

                -----Original Message-----
                From: Michael Marquart [mailto:micm@...]
                Sent: Friday, August 01, 2003 9:58 AM
                To: batchworld@yahoogroups.com
                Subject: Re: [BATCH WORLD] Re: Add local uses


                That one isn't double spaced.  Looks like your theory works, whatever it
                may be. :)

                On Fri, 1 Aug 2003 09:51:26 -0500, Morris, Lamar wrote:

                > No it's always been a mystery this is the only site that comes out like
                > this. I
                > Adding some extra text to test a theory.
                >
                > Lamar
                >
                > -----Original Message-----
                > From: Michael Marquart [mailto:micm@...]
                > Sent: Friday, August 01, 2003 9:45 AM
                > To: batchworld@yahoogroups.com
                > Subject: Re: [BATCH WORLD] Re: Add local uses
                >
                >
                > lamar, do you have an idea why your posts are double spaced?
                >
                > On Fri, 1 Aug 2003 09:17:38 -0500, Morris, Lamar wrote:
                >
                >> All net based commands are accessed via net help net command.
                >>
                >> 
                >>
                >> net help net user
                >>
                >> The syntax of this command is:


                --
                Regards,
                Michael


                Yahoo! Groups Sponsor
                ADVERTISEMENT




                To Post a message, send it to:   batchworld@...

                To Unsubscribe, send a blank message to: batchworld-unsubscribe@...

                Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.


                Yahoo! Groups Sponsor
                ADVERTISEMENT




                To Post a message, send it to:   batchworld@...

                To Unsubscribe, send a blank message to: batchworld-unsubscribe@...

                Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
              Your message has been successfully submitted and would be delivered to recipients shortly.