Results 1 to 3 of 3

Thread: Authenticated Users

  1. #1
    Steve Furniss Guest

    Authenticated Users

    How can I script adding the group "Authenticated Users" into the local
    "Administrators" group on a computer?

    I have tried the following script and it cant find the group:-

    Set objLocalGroup = GetObject("WinNT://" & strComputer &
    "/Administrators,group")

    Set objDomGroup2 = GetObject("WinNT://NT Authority/Authenticated Users")

    objLocalGroup.Add(objDomGroup2.ADsPath)

    Is what I want to do even possible ?

  2. #2
    Torgeir Bakken \(MVP\) Guest

    Re: Authenticated Users

    Steve Furniss wrote:

    > How can I script adding the group "Authenticated Users" into the local
    > "Administrators" group on a computer?
    >
    > I have tried the following script and it cant find the group:-
    >
    > Set objLocalGroup = GetObject("WinNT://" & strComputer &
    > "/Administrators,group")
    >
    > Set objDomGroup2 = GetObject("WinNT://NT Authority/Authenticated Users")
    >
    > objLocalGroup.Add(objDomGroup2.ADsPath)
    >
    > Is what I want to do even possible ?

    Hi,

    I would *strongly* recommend to add "NT Authority\Interactive" in the
    local Administrators group to let all domain users automatically be
    local admins when they log on to a computer interactively.

    This is more secure than adding "Authenticated Domain Users",
    "Domain Users", "NT AUTHORITY\Authenticated Users" or any other
    global security group because you avoid the issue with cross
    network admin rights (remote access) that these groups introduces.


    Adding it to the Administrators group with a command line:

    %SystemRoot%\system32\net.exe LOCALGROUP /ADD "Administrators"
    "NT Authority\Interactive"

    (the command above will wrap over to lines in the newsgroup post, it
    needs to be adjusted to be all on one line)


    Adding it to the Administrators group using VBScript:

    '--------------------8<----------------------
    Option Explicit

    Dim objNetwork, strComputer, objLocalGroup

    ' create network object for the local computer
    Set objNetwork = CreateObject("Wscript.Network")

    ' get the name of the local computer
    strComputer = objNetwork.ComputerName

    ' bind to the group
    Set objLocalGroup = GetObject("WinNT://" & strComputer & "/Administrators,group")

    ' add NT Authority\Interactive to the group
    On Error Resume Next ' suppress error in case it is already a member
    objLocalGroup.Add("WinNT://NT Authority/Interactive")
    On Error Goto 0
    '--------------------8<----------------------



    --
    torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway
    Administration scripting examples and an ONLINE version of
    the 1328 page Scripting Guide:
    http://www.microsoft.com/technet/scr...r/default.mspx

  3. #3
    Jerold Schulman Guest

    Re: Authenticated Users

    On Tue, 2 Aug 2005 06:04:02 -0700, "Steve Furniss" <SteveFurniss@discussions.microsoft.com> wrote:

    >How can I script adding the group "Authenticated Users" into the local
    >"Administrators" group on a computer?
    >
    >I have tried the following script and it cant find the group:-
    >
    >Set objLocalGroup = GetObject("WinNT://" & strComputer &
    >"/Administrators,group")
    >
    >Set objDomGroup2 = GetObject("WinNT://NT Authority/Authenticated Users")
    >
    >objLocalGroup.Add(objDomGroup2.ADsPath)
    >
    >Is what I want to do even possible ?


    Yes

    Set oShell = CreateObject("Wscript.Shell")
    sCmd = "%SystemRoot%\system32\net.exe localgroup administrators ""NT AUTHORITY\Authenticated Users"" /ADD"
    oShell.Run sCmd, 0, True


Similar Threads

  1. email phishing or authenticated mail from apple?
    By Affy in forum Networking & Security
    Replies: 5
    Last Post: 18-04-2012, 06:28 AM
  2. What clients are authenticated against a Domain Controller?
    By SpeedsIE in forum Active Directory
    Replies: 4
    Last Post: 18-05-2009, 08:34 PM
  3. Replies: 1
    Last Post: 20-09-2008, 11:29 AM
  4. Allowing file share browsing for un-authenticated users
    By Nonapeptide@gmail.com in forum Windows Server Help
    Replies: 9
    Last Post: 19-06-2008, 10:59 AM
  5. Replies: 5
    Last Post: 13-10-2007, 07:30 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,711,623,371.65991 seconds with 17 queries