Windows Vista Forums

Need help with a logon script for the domain user

  1. #1


    Sunny Chan Guest

    Need help with a logon script for the domain user

    Hello everybody,

    I am a Administrator in the Domain.I can let the users of Domain Admin to
    change its IP address through the Logon script. But,how about the Domain
    Users ?
    I want to let the domain user change its IP address through the logon
    script. How can I do ? Can someone help me edit the script to do that ?



      My System SpecsSystem Spec

  2.   


  3. #2


    Al Dunbar Guest

    Re: Need help with a logon script for the domain user


    "Sunny Chan" <cl_edp@xxxxxx> wrote in message
    news:O%23KdKDpYJHA.1268@xxxxxx

    > Hello everybody,
    >
    > I am a Administrator in the Domain.I can let the users of Domain Admin to
    > change its IP address through the Logon script. But,how about the Domain
    > Users ?
    > I want to let the domain user change its IP address through the logon
    > script. How can I do ? Can someone help me edit the script to do that ?
    Your normal users (i.e. not domain admins) generally lack the privileges
    required to modify the configuration of the workstations. This is a good
    thing, as it keeps them from making changes that interfere with its ability
    to function properly. Imagine, for example, if they were to set the IP
    address to something not in your subnet.

    But why is it that you want them to change the IP address? And how will your
    logon script ensure that it will never cause duplicate IP addresses?

    Why not let DHCP provide the IP addresses your workstations require?

    /Al



      My System SpecsSystem Spec

  4. #3


    Joe Blow Guest

    Re: Need help with a logon script for the domain user

    >

    > Why not let DHCP provide the IP addresses your workstations require?
    >
    > /Al
    >
    >
    Al,

    You took the words right out of my mouth!

    Joe




      My System SpecsSystem Spec

  5. #4


    sunny Guest

    Re: Need help with a logon script for the domain user

    Because I want to bind down the IP addresses to different users.So when
    logon from the different computer,they can change themself IP address
    through the logon script.



    "Joe Blow" <joe@xxxxxx> 写入消息新闻:uMhF2$rYJHA.412@xxxxxx

    > >
    >> Why not let DHCP provide the IP addresses your workstations require?
    >>
    >> /Al
    >>
    >>
    > Al,
    >
    > You took the words right out of my mouth!
    >
    > Joe
    >
    >
    >


      My System SpecsSystem Spec

  6. #5


    Richard Mueller [MVP] Guest

    Re: Need help with a logon script for the domain user

    IP addresses should be associated with computers, not users. In most cases,
    users do not have permissions to change IP addresses, and they should not.

    --
    Richard Mueller
    MVP Directory Services
    Hilltop Lab - http://www.rlmueller.net
    --

    "sunny" <sunny@xxxxxx> wrote in message
    news:%23BwDALvZJHA.5124@xxxxxx

    > Because I want to bind down the IP addresses to different users.So when
    > logon from the different computer,they can change themself IP address
    > through the logon script.
    >
    >
    >
    > "Joe Blow" <joe@xxxxxx>
    > 写入消息新闻:uMhF2$rYJHA.412@xxxxxx

    >> >
    >>> Why not let DHCP provide the IP addresses your workstations require?
    >>>
    >>> /Al
    >>>
    >>>
    >> Al,
    >>
    >> You took the words right out of my mouth!
    >>
    >> Joe
    >>
    >>
    >>
    >
    >


      My System SpecsSystem Spec

  7. #6


    sunny Guest

    Re: Need help with a logon script for the domain user

    Look at this Logon Script
    ************************************************************************************
    strComputer = "."
    Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
    Set colNetAdapters = objWMIService.ExecQuery _
    ("Select * From Win32_NetworkAdapterConfiguration Where IPEnabled =
    True")
    For Each objNetAdapter in colNetAdapters
    objNetAdapter.SetGateways array()
    next
    ************************************************************************************

    How to let the Domain Users run this script before logon access by Logon
    Script in Group Policy Object.



    "Richard Mueller [MVP]" <rlmueller-nospam@xxxxxx> 写入消息新闻:eKXVIZvZJHA.4520@xxxxxx

    > IP addresses should be associated with computers, not users. In most
    > cases, users do not have permissions to change IP addresses, and they
    > should not.
    >
    > --
    > Richard Mueller
    > MVP Directory Services
    > Hilltop Lab - http://www.rlmueller.net
    > --
    >
    > "sunny" <sunny@xxxxxx> wrote in message
    > news:%23BwDALvZJHA.5124@xxxxxx

    >> Because I want to bind down the IP addresses to different users.So when
    >> logon from the different computer,they can change themself IP address
    >> through the logon script.
    >>
    >>
    >>
    >> "Joe Blow" <joe@xxxxxx> 写入消息新闻:uMhF2$rYJHA.412@xxxxxx

    >>> >
    >>>> Why not let DHCP provide the IP addresses your workstations require?
    >>>>
    >>>> /Al
    >>>>
    >>>>
    >>> Al,
    >>>
    >>> You took the words right out of my mouth!
    >>>
    >>> Joe
    >>>
    >>>
    >>>
    >>
    >>
    >
    >


      My System SpecsSystem Spec

  8. #7


    Al Dunbar Guest

    Re: Need help with a logon script for the domain user


    "sunny" <sunny@xxxxxx> wrote in message
    news:%23BwDALvZJHA.5124@xxxxxx

    > Because I want to bind down the IP addresses to different users.
    When I asked you "Why not let DHCP provide the IP addresses your
    workstations require?" I was kind of hoping to get a reason somewhat more
    rationale than "because I don't want to". I know you don't want to, I just
    don't know why you don't want to, nor can I imagine a valid reason for this
    posture.

    > So when logon from the different computer,they can change themself IP
    > address through the logon script.
    That way lies madness. Once a user logs on and the IP is set, what will its
    IP address be on that workstation when the user logs off? If the same, then
    if the use logs on at another workstation, the script will be attempting to
    create a duplicate IP address. There is a component designed to prevent this
    problem automatically, and it is called DHCP.

    /Al

    >
    >
    >
    > "Joe Blow" <joe@xxxxxx>
    > 写入消息新闻:uMhF2$rYJHA.412@xxxxxx

    >> >
    >>> Why not let DHCP provide the IP addresses your workstations require?
    >>>
    >>> /Al
    >>>
    >>>
    >> Al,
    >>
    >> You took the words right out of my mouth!
    >>
    >> Joe
    >>
    >>
    >>
    >
    >


      My System SpecsSystem Spec

  9. #8


    Al Dunbar Guest

    Re: Need help with a logon script for the domain user


    "sunny" <sunny@xxxxxx> wrote in message
    news:OzjpmRxZJHA.556@xxxxxx

    > Look at this Logon Script
    > ************************************************************************************
    > strComputer = "."
    > Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
    > Set colNetAdapters = objWMIService.ExecQuery _
    > ("Select * From Win32_NetworkAdapterConfiguration Where IPEnabled =
    > True")
    > For Each objNetAdapter in colNetAdapters
    > objNetAdapter.SetGateways array()
    > next
    > ************************************************************************************
    >
    > How to let the Domain Users run this script before logon access by Logon
    > Script in Group Policy Object.
    Domain users cannot do anything before logging on, as they are not known as
    domain users until they have been identified as such.

    /Al

    >
    >
    >
    > "Richard Mueller [MVP]" <rlmueller-nospam@xxxxxx>
    > 写入消息新闻:eKXVIZvZJHA.4520@xxxxxx

    >> IP addresses should be associated with computers, not users. In most
    >> cases, users do not have permissions to change IP addresses, and they
    >> should not.
    >>
    >> --
    >> Richard Mueller
    >> MVP Directory Services
    >> Hilltop Lab - http://www.rlmueller.net
    >> --
    >>
    >> "sunny" <sunny@xxxxxx> wrote in message
    >> news:%23BwDALvZJHA.5124@xxxxxx

    >>> Because I want to bind down the IP addresses to different users.So when
    >>> logon from the different computer,they can change themself IP address
    >>> through the logon script.
    >>>
    >>>
    >>>
    >>> "Joe Blow" <joe@xxxxxx>
    >>> 写入消息新闻:uMhF2$rYJHA.412@xxxxxx
    >>>> >
    >>>>> Why not let DHCP provide the IP addresses your workstations require?
    >>>>>
    >>>>> /Al
    >>>>>
    >>>>>
    >>>> Al,
    >>>>
    >>>> You took the words right out of my mouth!
    >>>>
    >>>> Joe
    >>>>
    >>>>
    >>>>
    >>>
    >>>
    >>
    >>
    >
    >


      My System SpecsSystem Spec

  10. #9


    Richard Mueller [MVP] Guest

    Re: Need help with a logon script for the domain user

    As noted by Al, this requires the users to manage IP addresses across the
    network (to prevent duplicates), which is impossible. Just guessing, but
    perhaps your real aim is to track which users are logged on by pinging some
    IP address assigned to them. If so, this cannot work. What is your real
    purpose?

    --
    Richard Mueller
    MVP Directory Services
    Hilltop Lab - http://www.rlmueller.net
    --

    "sunny" <sunny@xxxxxx> wrote in message
    news:OzjpmRxZJHA.556@xxxxxx

    > Look at this Logon Script
    > ************************************************************************************
    > strComputer = "."
    > Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
    > Set colNetAdapters = objWMIService.ExecQuery _
    > ("Select * From Win32_NetworkAdapterConfiguration Where IPEnabled =
    > True")
    > For Each objNetAdapter in colNetAdapters
    > objNetAdapter.SetGateways array()
    > next
    > ************************************************************************************
    >
    > How to let the Domain Users run this script before logon access by Logon
    > Script in Group Policy Object.
    >
    >
    >
    > "Richard Mueller [MVP]" <rlmueller-nospam@xxxxxx>
    > 写入消息新闻:eKXVIZvZJHA.4520@xxxxxx

    >> IP addresses should be associated with computers, not users. In most
    >> cases, users do not have permissions to change IP addresses, and they
    >> should not.
    >>
    >> --
    >> Richard Mueller
    >> MVP Directory Services
    >> Hilltop Lab - http://www.rlmueller.net
    >> --
    >>
    >> "sunny" <sunny@xxxxxx> wrote in message
    >> news:%23BwDALvZJHA.5124@xxxxxx

    >>> Because I want to bind down the IP addresses to different users.So when
    >>> logon from the different computer,they can change themself IP address
    >>> through the logon script.
    >>>
    >>>
    >>>
    >>> "Joe Blow" <joe@xxxxxx>
    >>> 写入消息新闻:uMhF2$rYJHA.412@xxxxxx
    >>>> >
    >>>>> Why not let DHCP provide the IP addresses your workstations require?
    >>>>>
    >>>>> /Al
    >>>>>
    >>>>>
    >>>> Al,
    >>>>
    >>>> You took the words right out of my mouth!
    >>>>
    >>>> Joe
    >>>>
    >>>>
    >>>>
    >>>
    >>>
    >>
    >>
    >
    >


      My System SpecsSystem Spec

  11. #10


    Sunny Chan Guest

    Re: Need help with a logon script for the domain user

    Please look at this Logon Script
    ************************************************************************************
    strComputer = "."
    Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
    Set colNetAdapters = objWMIService.ExecQuery _
    ("Select * From Win32_NetworkAdapterConfiguration Where IPEnabled =
    True")
    For Each objNetAdapter in colNetAdapters
    objNetAdapter.SetGateways array()
    next
    ************************************************************************************
    In this logon script , I just want to change the Gateways address !!!!! When
    the Gateways address is null, the user can't connect to the Internet !!!

    "Al Dunbar" <alandrub@xxxxxx> 写入消息新闻:uO32vxWaJHA.1336@xxxxxx

    >
    > "sunny" <sunny@xxxxxx> wrote in message
    > news:%23BwDALvZJHA.5124@xxxxxx

    >> Because I want to bind down the IP addresses to different users.
    >
    > When I asked you "Why not let DHCP provide the IP addresses your
    > workstations require?" I was kind of hoping to get a reason somewhat more
    > rationale than "because I don't want to". I know you don't want to, I just
    > don't know why you don't want to, nor can I imagine a valid reason for
    > this posture.
    >

    >> So when logon from the different computer,they can change themself IP
    >> address through the logon script.
    >
    > That way lies madness. Once a user logs on and the IP is set, what will
    > its IP address be on that workstation when the user logs off? If the same,
    > then if the use logs on at another workstation, the script will be
    > attempting to create a duplicate IP address. There is a component designed
    > to prevent this problem automatically, and it is called DHCP.
    >
    > /Al
    >

    >>
    >>
    >>
    >> "Joe Blow" <joe@xxxxxx> 写入消息新闻:uMhF2$rYJHA.412@xxxxxx

    >>> >
    >>>> Why not let DHCP provide the IP addresses your workstations require?
    >>>>
    >>>> /Al
    >>>>
    >>>>
    >>> Al,
    >>>
    >>> You took the words right out of my mouth!
    >>>
    >>> Joe
    >>>
    >>>
    >>>
    >>
    >>
    >
    >


      My System SpecsSystem Spec

Page 1 of 2 12 LastLast

Need help with a logon script for the domain user
Similar Threads
Thread Forum
long name for logon script user VB Script
How to logon to W2K3 Domain Controller if "domain is not available"after trying to logon as as Administorator ? SBS Server
Creating logon scripts - the script will map different sets of drivesdepending on the security grp the user is in. VB Script
Logon Script Causing Laptops To Hang - Problems in script? VB Script
Failed to logon with domain user to Vista after copy local profile Vista account administration