Announcement

Collapse
No announcement yet.

DSMOD and DSGET two groups

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

  • DSMOD and DSGET two groups

    This one stumped me a bit:

    I have two security groups, SEC_A and SEC_B, and I want to modify list all users in SEC_A and modify SEC_B to include those users. Here is the script:

    dsget group "SEC_A, OU=SEC GROUPS, DC=domain, DC=local" -members | dsmod group "SEC_B, OU=SEC GROUPS, DC=domain, DC=local," -addmbr
    I received the following error

    The specified account name is already a member of the local group
    Even when using the -c argument I still receive that error. the -c should ignore all errors and continue. Only thing I could find about it was this:

    http://www.mail-archive.com/activedi.../msg39496.html

    Anyone know why this happens?

    I gave up and exported it to a .txt file and added them that way but just want to know why it didn;t work.

    Michael
    Michael Armstrong
    www.m80arm.co.uk
    MCITP: EA, MCTS, MCSE 2003, MCSA 2003: Messaging, CCA, VCP 3.5, 4, 5, VCAP5-DCD, VCAP5-DCA, ITIL, MCP, PGP Certified Technician

    ** Remember to give credit where credit is due and leave reputation points sigpic where appropriate **

  • #2
    Re: DSMOD and DSGET two groups

    Hi m8

    Firstly you need to specify the groups like this "CN=SEC_A" and you need to get rid of the ',' at the end after DC=local

    That will get it working for you.

    Comment


    • #3
      Re: DSMOD and DSGET two groups

      Mouse,

      Cheers for the reply. I'm pretty sure the syntax was correct as the command would not have executed (Sort of). I just had to remove some details as it contained confidential information pertaining to my client.

      I'll give it a try on my test network when I get home.

      Thanks for taking the time to reply and I will let you know how I get on.

      Thanks

      Michael
      Michael Armstrong
      www.m80arm.co.uk
      MCITP: EA, MCTS, MCSE 2003, MCSA 2003: Messaging, CCA, VCP 3.5, 4, 5, VCAP5-DCD, VCAP5-DCA, ITIL, MCP, PGP Certified Technician

      ** Remember to give credit where credit is due and leave reputation points sigpic where appropriate **

      Comment

      Working...
      X