Re: adding windows user via sp_cmdshell

From: Hari Prasad (hari_prasad_k_at_hotmail.com)
Date: 07/23/04

  • Next message: Birdy: "SQL slammer, i have it, awww geez now what?"
    Date: Fri, 23 Jul 2004 11:12:24 +0530
    
    

    Hi,

    Yes. See the OS commands NET USER and NET GROUP in OS Help. You can use this
    command from Query Anayzer using XP_CMDSHELL.

    Sample

    Master..XP_cmdshell 'net user Fin_user password /DOMAIN /ADD'
    go
    Master..XP_cmdshell 'net group Finance /DOMAIN /ADD'
    go

    For more details of command execute the below from command prompt

    net user ?

    net group ?

    Thanks
    Hari
    MCDBA

    "TOM P." <TOMP@discussions.microsoft.com> wrote in message
    news:E8D38151-CF4C-4EF9-A713-617E25BA2AEE@microsoft.com...
    > assuming SQL server nt service is started under domain user with right to
    create windows user in domain, is there a way to execute sp_ in QA that
    allow mw to create domain user, set password and add user to group in
    domain? if so can anyone provide this statment.
    >
    > Tom,


  • Next message: Birdy: "SQL slammer, i have it, awww geez now what?"

    Relevant Pages

    • Re: adding windows user via sp_cmdshell
      ... See the OS commands NET USER and NET GROUP in OS Help. ... > command from Query Anayzer using XP_CMDSHELL. ... > For more details of command execute the below from command prompt ...
      (microsoft.public.sqlserver.security)
    • add Domain user to local group with command line
      ... Does anyone know how to add a domain user to a local grop ... from the command line? ... i played with net user, ... localgroup, and netdom.exe but can't quite figure it out. ...
      (microsoft.public.windowsxp.setup_deployment)
    • Re: Im halfway there
      ... Close the Command Prompt. ... the Acer (Ray), assuming it's okay on a wireless network to have them ... Create an account for Ray. ...
      (microsoft.public.win2000.networking)
    • Re: Im halfway there
      ... Close the Command Prompt. ... Laptop 2, a Toshiba, the net command resulted in the following: ... the Acer (Ray), assuming it's okay on a wireless network to have them ...
      (microsoft.public.win2000.networking)
    • Re: Sharing and Security on File Share
      ... net user %UserName%>> c:\test.txt ... When I got to the command: ... "Pegasus (MVP)" wrote: ...
      (microsoft.public.windows.file_system)