Announcement

Collapse
No announcement yet.

Change user's pre-windows 2000 (netbios) logon name's?

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Change user's pre-windows 2000 (netbios) logon name's?

    Hi,

    I'm struggeling to find a way to change multiple user logon name's (pre-windows 2000). We currently use user intials for logon names but are looking to change to 'firstname.surname'.
    I have used ADModify.exe to bulk change the users UPN's by pulling in the name details from there account, but it does not give the option to change the pre-windows 2000 name.

    Can anybody shed some light on this?

    Alex

  • #2
    Re: Change user's pre-windows 2000 (netbios) logon name's?

    PM sent.

    Comment


    • #3
      Re: Change user's pre-windows 2000 (netbios) logon name's?

      You can write a very simple script that will query the user account for, will take givenName and sn and will update sAMAccountName accordingly.
      Guy Teverovsky
      "Smith & Wesson - the original point and click interface"

      Comment


      • #4
        Re: Change user's pre-windows 2000 (netbios) logon name's?

        Originally posted by jp1 View Post
        PM sent.
        I would strongly advise that anyone here who thinks that their advice is "Private" either has some agenda or is giving dodgy advice they don't want seen by the skilled crew here. Advice over Private Message has no place in a community such as this.


        Tom
        For my own and your protection, I do not provide support by private message under any circumstances. All such messages will be deleted and ignored.

        Anything you say will be misquoted and used against you

        Comment


        • #5
          Re: Change user's pre-windows 2000 (netbios) logon name's?

          The PM was only because I PM'd jp1 about a similar closed thread before I created this one! So not to worry, no dodgy advise being given!

          Comment


          • #6
            Re: Change user's pre-windows 2000 (netbios) logon name's?

            Originally posted by Stonelaughter View Post
            I would strongly advise that anyone here who thinks that their advice is "Private" either has some agenda or is giving dodgy advice they don't want seen by the skilled crew here. Advice over Private Message has no place in a community such as this.

            Sorry guys...my bad. Wasn't trying to hide anything.

            Comment


            • #7
              Re: Change user's pre-windows 2000 (netbios) logon name's?

              maybe one of you can post the url
              Marcel
              Technical Consultant
              Netherlands
              http://www.phetios.com
              http://blog.nessus.nl

              MCITP(EA, SA), MCSA/E 2003:Security, CCNA, SNAF, DCUCI, CCSA/E/E+ (R60), VCP4/5, NCDA, NCIE - SAN, NCIE - BR, EMCPE
              "No matter how secure, there is always the human factor."

              "Enjoy life today, tomorrow may never come."
              "If you're going through hell, keep going. ~Winston Churchill"

              Comment


              • #8
                Re: Change user's pre-windows 2000 (netbios) logon name's?

                Here's the script that I used. Just to give credit where credit is due...I didn't write this script. I got it from a buddy of mine who's a network admin too.

                Code:
                ' Usage cscript upn2sam.vbs
                '
                ' Set the LDAP to the appropriate OU
                ' Users contain is cn=Users, otherwise ou=
                ' Change the 9 to the number of characters in the UPN suffix (@name.com=9)
                 
                Set objOU = GetObject("LDAP://ou=TestAcct,dc=name,dc=com")
                 
                
                objOU.Filter = Array("user")
                 
                For Each objUser In objOU
                 
                objUser.GetInfo
                 
                 struserPrincipalName = objUser.Get("userPrincipalName")
                 struserlength = Len(struserPrincipalName)
                 strabbrevuser = struserlength - 9
                 strabbrvname = Left(struserPrincipalName, strabbrevuser)
                 objUser.Put "sAMAccountName", strabbrvname
                 objUser.SetInfo
                Next
                This gave me the same Pre-2000 login name as the regular logon name.

                Comment


                • #9
                  Re: Change user's pre-windows 2000 (netbios) logon name's?

                  Thanks! will give it a go and let you know how i get on.

                  This was the previous thread I came across -http://forums.petri.com/showthread.php?t=15772

                  Comment


                  • #10
                    Re: Change user's pre-windows 2000 (netbios) logon name's?

                    Worked a treat! Thank you very much!

                    Alex

                    Comment

                    Working...
                    X