Go Back   TechArena Community > Technical Support > Computer Help > Windows Server > Windows Server Help
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Sponsored Links



Authenticated Users

Windows Server Help


Reply
 
Thread Tools Search this Thread
  #1  
Old 02-08-2005
Steve Furniss
 
Posts: n/a
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 ?

Reply With Quote
  #2  
Old 02-08-2005
Torgeir Bakken \(MVP\)
 
Posts: n/a
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
Reply With Quote
  #3  
Old 02-08-2005
Jerold Schulman
 
Posts: n/a
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

Reply With Quote
Reply

  TechArena Community > Technical Support > Computer Help > Windows Server > Windows Server Help
Tags:



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "Authenticated Users"
Thread Thread Starter Forum Replies Last Post
email phishing or authenticated mail from apple? Affy Networking & Security 5 18-04-2012 06:28 AM
What clients are authenticated against a Domain Controller? SpeedsIE Active Directory 4 18-05-2009 08:34 PM
Different between Authenticated Users and Everyone when all are accessed to share folder Aadimoolan Windows Security 1 20-09-2008 11:29 AM
Allowing file share browsing for un-authenticated users Nonapeptide@gmail.com Windows Server Help 9 19-06-2008 10:59 AM
ADAM - How to add Authenticated Users to Readers group? Mann Active Directory 5 13-10-2007 07:30 PM


All times are GMT +5.5. The time now is 01:27 PM.