Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

msNPAllowDialin - scripting "Allow dial-in access"

465 views
Skip to first unread message

Matt

unread,
May 2, 2001, 3:15:12 PM5/2/01
to
W2K native mode.
Using VbScript to try and set the Remote Access Permission to "Allow Access"
for a user account. Does anyone have a script to do this? I can't seem to
get it to work.

Thanks


Big Brother

unread,
May 2, 2001, 2:40:58 PM5/2/01
to
It does not matter if you are in Mixed or native mode. Enabling remote access works the same way in each case.

The attribute to set is: MsNPAllowDialin

There are other attributes also.
MSNPCallingStationID
MSNPSavedCallingStationID
MSRadiusCallbackNumber
MSRadiusFramedRoute
MSRadiusFramedIPAddress
MSRASSavedCallbackNumber
MSRASSavedFramedIPAddress
MSRASSavedFrameRoute

I'd suggest that you modify an existing user account to set the parametes you want for the users.
Once this is done, Use the ADSI edit snapin to view the attributes that are affected and then set the script to modify them.
Let me know how it works.

Here's a code snippet for you.


'Create the user account.
Set OUobj = GetObject(ldappath)
'Create the user account
Set UserData = OuObj.Create("user", CommonName)
UserData.Put "sAMAccountName", LoginName
UserData.Put "userPrincipalName", LoginName & "@" & DomainSuffix
UserData.put "givenName", givenName
UserData.put "sn", sn
UserData.put "name", FullName
UserData.put "displayName", FullName
UserData.put "mail", LoginName & "@" & DomainSuffix
'Save the changes
UserData.SetInfo
'Set additional parameters.
'Enable the account
UserData.accountdisabled = false
'Enable dialin access
UserData.MsNPAllowDialin = True
UserData.Setinfo

Matt

unread,
May 2, 2001, 3:59:30 PM5/2/01
to
I was setting msNPAllowDialin to "True", "yes" or 0, none of which were
working.
True without quotes did it.

Thanks a million
"Big Brother" <knows...@hotmail.com> wrote in message
news:ipn0ft0cihmg6v4oq...@4ax.com...

Big Brother

unread,
May 2, 2001, 3:05:11 PM5/2/01
to
You're welcome
0 new messages