Sei sulla pagina 1di 18

CONTENIDO

CREANDO CUENTAS DE USUARIO ................................................................................................... 3 CUENTAS DE USUARIO ................................................................................................................... 3 COMANDO DSADD (Directory Services Add) ...................................................................................... 4 COMANDO LDIFDE ............................................................................................................................... 4 CREANDO CUENTAS DE COMPUTADORAS ................................................................................... 5 AGREGAR UNA COMPUTADORA AL DOMINIO......................................................................... 5 CREACION MANUAL DE CUENTAS DE COMPUTADORA........................................................ 5 UTILIZACION DEL COMANDO REDIRCMP ................................................................................. 6 CREACION DE CUENTA DE COMPUTADORA MEDIANTE EL COMANDO DSADD ............ 6 PROPIEDADES DE USUSARIOS Y COMPUTADORAS .................................................................... 6 EXPLICAR LAS PROPIEDADES DE LOS USUARIOS Y COMPUTADORAS. ........................... 6 RENOMBRAR UNA CUENTA .......................................................................................................... 6 PLANTILLAS PARA CUENTAS DE USUARIOS ................................................................................ 7 GUIAS PARA LA CREACION DE USUARIOS.................................................................................... 7 ADMINISTRANDO CUENTAS DE USUARIO Y COMPUTADORAS .............................................. 7 HABILITAR O DESHABILITAR CUENTAS DE USUARIO........................................................... 7 BLOQUEO DE CUENTAS (LOCK OUT) .......................................................................................... 7 RESETEAR EL PASSWORD DEL USUARIO .................................................................................. 8 RESETEAR UNA CUENTA DE COMPUTADORA: ........................................................................ 8 Utilizacin de Consultas para localizar usuarios y computadoras ............................................................ 8 SAVED QUERIES ............................................................................................................................... 8 EXPORT AND IMPORT ..................................................................................................................... 9 Dsadd ...................................................................................................................................................... 10 dsadd computer ................................................................................................................................... 10 Syntax ................................................................................................................................................. 10 Parameters ........................................................................................................................................... 10 Remarks .............................................................................................................................................. 10 Examples ............................................................................................................................................. 11 dsadd contact ....................................................................................................................................... 11 Syntax ................................................................................................................................................. 11 Parameters ........................................................................................................................................... 11 Remarks .............................................................................................................................................. 12 Examples ............................................................................................................................................. 12 dsadd group ......................................................................................................................................... 12 Syntax ................................................................................................................................................. 12 Parameters ........................................................................................................................................... 12 Remarks .............................................................................................................................................. 13 Examples ............................................................................................................................................. 13 dsadd ou .............................................................................................................................................. 13 Syntax ................................................................................................................................................. 14 Parameters ........................................................................................................................................... 14 Remarks .............................................................................................................................................. 14 Examples ............................................................................................................................................. 14 dsadd user............................................................................................................................................ 14 Mdulo 2 Pgina 1

Syntax ................................................................................................................................................. 14 Parameters ........................................................................................................................................... 15 Remarks .............................................................................................................................................. 16 Examples ............................................................................................................................................. 17 dsadd quota ......................................................................................................................................... 17 Syntax ................................................................................................................................................. 17 Parameters ........................................................................................................................................... 17 Remarks .............................................................................................................................................. 18 Examples ............................................................................................................................................. 18 Formatting legend ............................................................................................................................... 18

Mdulo 2

Pgina 2

CREANDO CUENTAS DE USUARIO


CUENTAS DE USUARIO Las cuentas de usuario son credenciales que van a identificar a cada uno de los usuarios frente a una computadora o una red. Estas cuentas pueden ser LOCALES si se crean en una computadora, o cuentas de DOMINIO sin son creadas en el Active Directory. La diferencia entre una cuenta de dominio y una cuenta local es que las cuentas locales solo se pueden utilizar en la computadora en la cual fue creada. Mientras que las cuentas de Dominio pueden utilizarse en cualquier computadora que pertenezca al Dominio. Existen 5 nombres que estn asociados a una misma cuenta de usuario. Todos identifican al mismo objeto, el uso radica en la herramienta o funcin con la que estemos refirindonos al objeto. 1.- USER LOGON NAME: El usuario utiliza este nombre cuando ingresa a la red o a una maquina local y utiliza: Autenticacin PreWindows 2000, username, password y Dominio. El nombre debe de ser nico en todo el Bosque, tiene un tamao mximo de 20 Caracteres. No es sensible a maysculas y minsculas, pero si retiene si el nombre se escribi en maysculas o minsculas Ejemplo lperez 2.- PRE-WINDOWS 2000 LOGON NAME: Estos se forman de 2 partes que son Nombre de Dominio \ User Logon Name ejemplo Corp\lperez, estos nombres son los que tradicionalmente se utilizan al ingresar a Redes Microsoft. 3.- USER PRINCIPAL LOGON NAME: Es un nuevo nombre que se utiliza a partir de Windows 2003 para poder ingresar al dominio. Se compone bsicamente de 2 partes, la primera parte es el USER LOGON NAME seguido por el carcter @ y luego le sigue lo que se le conoce como Sufijo ejemplo lperez@corp.com normalmente el sufijo es el nombre del dominio, pero este puede ser cambiado y se pueden agregar otros sufijos. 4.- LDAP DISTINGUISED NAME: Al igual que las OU los objetos tambin los podemos acceder mediante el Protocolo LDAP lleva el siguiente formato CN+OU+DC CN= Common Name del Objeto OU= Empezando por la OU que se encuentra ms cerca del Objeto o Usuario DC= Nombre del Dominio Ejemplo CN=luis, OU=ventas, DC=corp, DC=com 5.- LDAP RELATIVE DISTINGUISED NAME: Este es solo una porcin de lo que es el nombre completo del Distinguised Name, ejemplo CN= Luis, Algo que debemos conocer es que internamente se utiliza lo que se conoce como el SID.

Mdulo 2

Pgina 3

SID: Cada uno de los usuarios es representado por un Identificador nico que se llama SID. Este es el que lo identifica en el Active Directory. Para crear una cuenta de usuario de Dominio nos vamos a la herramienta Active Directory User and Computers. Seleccionamos la Unidad Organizativa en la que va a residir el usuario, clic derecho a la OU, New User, pregunta el nombre, el apellido, generando automticamente el nombre completo, despus pregunta el User Logon Name, es bueno tener una poltica para crear estos nombre, ejemplo la primera inicial del nombre seguida por el apellido, despus pregunta el Sufijo, estos dos nos da el User Principal Name, y podemos poner el Pre-Windows 2000 User Logon Name, le damos siguiente y nos pregunta el password, estos se rigen por la poltica del active directory que podemos definir, luego confirmamos el mismo password y tendremos diferentes opciones.

COMANDO DSADD (Directory Services Add)


Dsadd user cn=Hugo,ou=ventas,ou=Guatemala,ou=corp,dc=corp,dc=com samid hsing upn hsing@corp.com pwd p@ssw0r1 display Hugo Sing User: nos indica que vamos a agregar al Active Directory un objeto usuario Luego escribimos el Distinguised Name entre comas. Empezando por la OU que se encuentra ms cerca del Objeto o Usuario, subiendo todos los niveles hasta llegar al dominio. -samid = le decimos cual es el User Logon Name -upn = (User Principal Name) -pwd = Password -display = Display Name Ejecutamos el comando en la consola de comandos y este es creado al Active Directory.

COMANDO LDIFDE
Se crea un archivo de texto con una sintaxis especial en este ejemplo se crean dos usuarios. DN: CN=Hugo, OU=ventas,OU=Guatemala,OU=corp,DC=Corp,DC=com Changetype: add CN: Hugo Description: Gerente de Ventas Objectclass: User SAMAccountName: hsing DN: CN=Carolina, OU=ventas,OU=Guatemala,OU=corp,DC=Corp,DC=com Changetype: add CN: Carolina Description: Gerente de Cuentas Corporativas Objectclass: User SAMAccountName: cbarrera

En cada lnea se escriben los diferentes atributos Mdulo 2 Pgina 4

DN = Distinguised Name Changetype: add (para agregar un objeto) CN = Common Name Description = descripcin ObjectClass= la clase de objeto en este caso es un usuario user SAMAccountName= Logon Name Se guarda el archivo y se ejecuta desde la lnea de comando de esta forma Ldifde i f ldifde.txt -i para importar un archivo -f seguido del nombre del archivo o file Al darle enter nos dice si importo de forma satisfactoria las entradas.

CREANDO CUENTAS DE COMPUTADORAS


Las cuentas de computadora sirven para poder autenticar y auditar a las computadoras que pertenecen a un Dominio. Adems de poder instalar software de forma remota, administrar el entorno de trabajo y poder sacar un inventario tanto de hardware como de software, estas cuentas de computadora son requeridas a partir de Windows Nt, como Windows XP, Windows 2003, Windows Vista, Windows 7, Windows 2008. Para que un usuario pueda tener ingreso a la red, es necesario que este cuente con una cuenta de usuario valida y adems en la computadora donde est trabajando tenga una cuenta de computadora valida. AGREGAR UNA COMPUTADORA AL DOMINIO Las cuentas de computadora son creadas de forma automtica al momento que se adhiere una computadora al Dominio, esto se hace dando clic derecho a my pc, propiedades, en Computer name, le damos Change y aqu escribimos el nombre de la computadora y el nombre del dominio a la que pertenece, al momento de que fue pegada al dominio automticamente se crea una cuenta de computadora. Esto lo puede hacer cualquier usuario que pertenezca al dominio. El usuario puede autenticar un mximo de 10 computadoras. Al ir al Active Directory user and computer, buscamos la OU Computers, todas las cuentas de computadoras que se crean automticamente residen en esta OU automticamente.

CREACION MANUAL DE CUENTAS DE COMPUTADORA. Para poder crear de forma manual nos vamos al Active Directory User and Computers, vamos a la OU en la cual queremos crear las cuentas de computadoras, le damos clic derecho escogemos new, Computer, nos pedir el Nombre de la Computadora, ejemplo wks-gventas, podemos modificar que grupo o usuario va a poder agregar la maquina al dominio, le podemos decir si esta computadora es Pre-Windows 2000, as se crea la cuenta de computadora, est lista para que pueda ser pegada al dominio

Mdulo 2

Pgina 5

UTILIZACION DEL COMANDO REDIRCMP En el momento de crear una cuenta de computadora automtica, por default estas cuentas caen en el objeto contenedor Computes, es posible modificar esta opcin para que por default caigan a otro contenedor, esto lo hacemos utilizando el comando RDIRCMP (redireccionar cuentas de computadora) para eso nos vamos a la consola de comandos y nos pasamos hacia la carpeta donde est instalado el Windows sobre la carpeta system32, cd %systemroot%\system32, luego escribimos el comando redircmp ou=corp,dc=corp,dc=com la primera parte es el nombre del comando REDIRCMP La segunda parte es el Distingused Name de la OU donde queremos que se creen las computadoras. De ahora en adelante cuando se crean computadoras automticas de domino se crearan en la OU que hemos elegido, esto solo funciona si el nivel de funcionalidad de nuestro dominio actual es Windows Server 2003 o mayor. Por default viene Windows 2000, y lo primero que hay que hacer es elevar este rol para poder utilizar este comando. CREACION DE CUENTA DE COMPUTADORA MEDIANTE EL COMANDO DSADD Nos vamos a la lnea de comando y escribimos el comando dsadd computer cn=wks-ventas1,ou=ventas,ou=guatemala,ou=corp,dc=corp,dc=com loc area ventas ver complemento de la 2da unidad.

PROPIEDADES DE USUSARIOS Y COMPUTADORAS


Para un administrador es importante poder modificar las propiedades tanto de las cuentas de usuario como de las cuentas de las computadoras, ya que estas pueden ser una fuente de informacin para los usuarios dentro de la red. Tambin poder hacer otro tipo de modificaciones que afecten el entorno de los usuarios o computadoras. EXPLICAR LAS PROPIEDADES DE LOS USUARIOS Y COMPUTADORAS. Desde el Active Directory User and Computers, vemos los diferentes usuario y cuentas de computadoras, simplemente vamos al usuario que queremos modificar y le damos doble clic, aqu nos aparecen las diferentes propiedades que podemos estar modificando de este usuario. As mismo podemos modificar las cuentas de computadora, y al darle doble clic nos aparecern las propiedades, podemos agregar una descripcin, poner un encargado de la computadora para administrarla, poder escribir la localizacin de esta computadora etc. RENOMBRAR UNA CUENTA Otra de las caractersticas que podemos modificar en el Active Directory la podemos encontrar al posicionarnos sobre un objeto en especial, simplemente dndole un clic derecho y escoger en el men lo que vayamos a realizar, ejemplo, deshabilitar una cuenta, Reset password, Renombrar etc. Ejemplo, tenemos un usuario que ya no estar en la empresa, y en su lugar viene otra persona y queremos que tenga las mismas propiedades, podemos renombrar la cuenta, al darle enter nos aparecer las propiedades personales, como el nombre, user logon name etc.

Mdulo 2

Pgina 6

PLANTILLAS PARA CUENTAS DE USUARIOS


El uso de Plantillas o TEMPLATES es un mtodo que nos ayuda a facilitar la creacin de cuentas de usuarios. Estas plantillas son simplemente cuentas de usuario en las que se han configurado las diferentes propiedades y son utilizadas para la creacin de nuevas cuentas de usuario a partir de ellas. Estas cuentas nadie las debe utilizar y deben de permanecer siempre deshabilitadas. Es importante conocer que no todas las propiedades que pre configuremos en la plantilla se copiaran Asia la nueva cuenta de usuario. Dentro de las propiedades del usuario que si se copearan podemos encontrar las pestaas de: Pestaa ADDRESS, aqu se copiaran todas las propiedades excepto el Street address Pestaa ACCOUNT: todas las propiedades excepto el Logon Name Pestaa PROFILE: todas las propiedades excepto Profile path y Home Flder Pestaa ORGANIZATION: todas las propiedades excepto Title Pestaa MEMBER OF: Todas las propiedades.

GUIAS PARA LA CREACION DE USUARIOS


Desde al Active Directory User and Computers, creamos un nuevo usuario, como nombre Template Ventas, User logon name tventas, colocamos un password, y ponemos account disable, enter Despus abrimos nuestro usuario y modificamos sus propiedades, ejemplo en la pestaa Member of, ingresamos a todos los grupos a los que los usuarios de ventas pertenece, y as ingresamos todas las propiedades. Cuando queremos crear un usuario sobre este template, simplemente le damos botn derecho sobre el Template, y luego le damos la opcin de copy, ponemos los datos del usuario nuevo, y automticamente va a dejarle las propiedades del Template. Al crear el usuario podemos entrar a sus propiedades para llenar lo que no copia el template.

ADMINISTRANDO CUENTAS DE USUARIO Y COMPUTADORAS


HABILITAR O DESHABILITAR CUENTAS DE USUARIO. Desde el Active Directory user and computer, ejemplo un usuario que salga de vacaciones y no queremos que nadie pueda utilizarla por ese tiempo, la debemos deshabilitar, y cuando regrese la podemos habilitar, para eso le damos un clic derecho sobre el usuario y le demos Disable Account, lo mismo para habilitarla le damos Enable Account. Esta opcin la podemos hacer al momento de crear la cuenta donde pregunta el password podemos deshabilitar la cuenta. BLOQUEO DE CUENTAS (LOCK OUT) Esta caracterstica es utilizada para definir el nmero de fallos de intento de ingreso a la red y tambin como proteccin contra hackers que intentan averiguar la contrasea de una cuenta. Estos fallos de intento de ingreso se contaran cuando el usuario no ingresa correctamente su contrasea, ya sea en la ventana de logon cuando inicie su computadora o al intentar desproteger una computadora que tiene un des cansador de pantalla protegido por contrasea. Mdulo 2 Pgina 7

Esta opcin viene deshabilitada por default y para hacerlo hay que modificar la poltica Interactive Logon: Require Domain controller authentication to unlcok Workstation o al acceder a un recurso en la red. Debemos de tomar nota que la cuenta Pre-construida del administrador NUNCA ser bloqueada, por tanto una buena prctica es renombrar esta cuenta. RESETEAR EL PASSWORD DEL USUARIO Para cambiar el password de un usuario le damos clic derecho sobre el usuario y le damos Reset Password, y nos pregunta el nuevo password del usuario. As el usuario tendr una nueva contrasea. Hay que tomar en cuenta que si esta contrasea es utilizada por el algoritmo de encriptacin y el usuario tiene archivos o correos electrnicos protegidos o encriptados en este caso el usuario ya no podr tener acceso a esos archivos y emails, ya que el algoritmo como parte de encriptacin utiliza el password, y tambin si el usuario tena guardado el password en el Internet Explorer tambin tendra problemas. RESETEAR UNA CUENTA DE COMPUTADORA: Lo primero que debemos de conocer es cuando lo debemos de estar haciendo, esto lo hacemos por 2 razones 1.- Cuando la cuenta de la computadora falla en la autenticacin hacia el dominio. 2.- Cuando la cuenta de la computadora haya perdido el password de sincronizacin. En estos momentos se necesit resetear la cuenta de computadora, para hacerlo se le da botn derecho y le damos Reset Account, que implicaciones tiene esto: 1.- Solo las cuentas que estn como Account Operator, Domain Admin o Enterprise Admin pueden hacer el reset de una computadora. Algo importante es que cuando se resetea la cuenta es necesario volver a pegar al dominio la mquina que era duea de esta cuenta de computadora.

Utilizacin de Consultas para localizar usuarios y computadoras


En el active Directory, cuando crece, y aumenta la cantidad de objetos se empieza hacer complicado en localizar, para eso hay una opcin de bsqueda, al ponernos dentro de cualquier OU le damos clic derecho y usamos el find. Podemos seleccionar diferentes objetos dentro del Active Directory, y vemos las propiedades de la bsqueda, y podemos usar las opciones avanzadas para hacer una bsqueda especfica. SAVED QUERIES Para dejar guardadas las consultas en el Active Directory, podemos usar el contenedor Saved Queries, para futuras bsquedas, para crear una nueva consulta, le damos botn derecho en new, Quero, le ponemos el nombre de la consulta, y le decimos sobre que dominio, que incluya los sub contenedores, y luego definimos la consulta, por default aparecen las consultas comunes, para hacer consultas avanzadas le damos en buscar en Users, Contancts and Group, all podemos hacer consultas avanzadas. Al grabar quedan automticamente los usuarios y los objetos que cumplan el criterio de bsqueda.

Mdulo 2

Pgina 8

EXPORT AND IMPORT Para exportar e importar, la definicin de nuestras bsquedas almacenadas, nos vamos a la consulta le damos clic derecho y le decimos que exporte la consulta, nos pregunta el nombre y la ubicacin donde queda grabado, esto crea un archivo XML, al darle un doble clic al archivo podemos leer el contenido de una consulta, esta es la definicin y no los valores. Para importar la consulta, nos vamos a Saved Queries, le damos clic derecho, import, le Damos open sobre el archivo, y nos queda el Quero almacenado de nuevo.

Mdulo 2

Pgina 9

Dsadd D
A Adds specific types of objec to the dire cts ectory. The ds sadd comman nds include: dsadd computer dsadd cont tact dsadd grou up dsadd ou dsadd user r dsadd quot ta

dsad compute dd er
A Adds a single computer to the directory.
Top of page

d dsadd computer Compute erDN [-samid SAMName] [-desc Descrip d [ iption] [-locLo ocation] [-me emberof Grou upDN ...] e] word | *}] [-q [{-uc | -uc o | -uci}] q] [{-s Server | -d Domain}] [-uUserName [-p {Passw ComputerDN N Required. Spe ecifies the dist tinguished name of the com mputer you wa to add. If the distinguis ant shed name is o omitted, it will be taken from standa input (stdi ard in). Name -samid SAMN Specifies to use the SAM na ame as the un nique SAM acc count name fo this comput (for example, TESTPC2$). If this or ter a om of on bute used parameter is not specified, then a SAM account name is derived fro the value o the commo name attrib DN. in ComputerD -desc Descri iption Specifies the description of the computer you want to add. f n -loc Location Specifies the location of the computer yo want to add. e ou G -memberof GroupDN ... Specifies the groups in which you want the computer as a member t r. {-s Server | -d Domain} Connects the computer to either a specif e fied server or domain. By d default, the co omputer is con nnected to the domain e controller in the logon dom main. e -u UserName Specifies the user name with which the user logs on to a remote se u erver. By defa ault, -u uses the user name with e w which the use logged on. You can use any of the follo er Y a owing formats to specify a user name:us name (for s ser example, Lind da)domain\use name (for example, widg er e gets\Linda)us principal na ser ame (UPN) (fo example, or Linda@widget ts.microsoft.com) -p {Passwor rd| *} Specifies to use either a pa assword or a * to log on to a remote serv ver. If you typ *, you are prompted for a pe r password. -q e). Suppresses all output to standard output (quiet mode {-uc | -uco | -uci} Specifies that output or inp data is formatted in Unicode. The foll t put lowing table li ists and descr ribes each f format.ValueD Description-uc Specifies a Unicode forma for input fro or output to a pipe (|).c U at om -uco Specifies a s Unicode forma for output to a pipe (|) or a file. -uci Specifies a Un at t o S nicode format for input from a pipe (|) or a file. m /? and prompt. Displays help at the comma

Syntax

Paramete ers

Remarks s
If you do not supply a ta arget object at the comman prompt, the target objec is obtained from standard input t nd e ct d din b oard, a redirec cted file, or as piped output from another s t (stdin). Std data can be accepted from the keybo command. To mark the end of stdin data from the keyboard or i n a redirected file, use the end-of-file ch d d haracter (CTRL+Z).

Mdulo 2

P gina 10

If a value that you suppl contains spaces, use quo t ly otation marks around the te (for example, ext "CN=DC 2,OU=Domain Controllers,DC C C=Microsoft,D DC=Com"). If you supp multiple va ply alues for a par rameter, use spaces to sep parate the valu (for exam ues mple, a list of distinguished names).

Examples s
T create a co To omputer accou named Wo unt orkstationA in the default C n Computers con ntainer of fabrikam.com, at a t command pro ompt, type the following com e mmand, and then press EN t NTER: d dsadd computer cn=Wor rkstationA,cn=computer rs,dc=fabrika am,dc=com T create a co To omputer accou named Wo unt orkstationB in a top-level O named Ser n OU rvice Dept in t the same dom main, at a command pro ompt, type the following com e mmand, and then press EN t NTER: d dsadd computer "cn=Wo orkstationB,o ou=service dept,dc=fabr d om" rikam,dc=co

dsadd contact t
A Adds a single contact to the directory. e

Syntax

Top of page

d dsadd contact ContactDN [-fn FirstNam [-mi Initia [-ln LastN N me] al] Name] [-displa DisplayNam [-desc ay me] D Description] [-office Office [-tel Phone [ e] eNumber] [-em mail Email] [-hometel Hom mePhoneNum mber] [-pager r P PagerNumber [-mobile Ce r] ellPhoneNumb ber] [-fax Fax xNumber] [-ip ptel IPPhoneN Number] [-titl Title] [-dep le pt D Department] [-company Company] [{-s Server | -d Domain}] [-u UserName] [-p {Passwor | *}] [-q ] [{-uc | C u rd uco | -uci }]

Paramete ers
ContactDN ecifies the dist tinguished name of the con ntact you want to add. If the distinguishe name is om t ed mitted, it Required. Spe w be taken from standard input (stdin) will f d ). -fn FirstNam me Specifies the first name of the contact yo want to ad ou dd. -mi Initial t Specifies the middle initial of the contact you want to add. -ln LastName t ou d. Specifies the last name of the contact yo want to add playName -display Disp Specifies the display name of the contac you want to add. ct o iption -desc Descri Specifies the description of the contact you want to ad f y dd. e -office Office Specifies the office location of the contac you want to add. n ct o umber -tel PhoneNu Specifies the telephone num mber of the co ontact you wa to add. ant l -email Email Specifies the e-mail addres of the conta you want to add. ss act t omePhoneNu umber -hometel Ho Specifies the home telepho one number of the contact you want to a dd. f y erNumber -pager Page Specifies the pager number of the contact you want to add. o PhoneNumber -mobile CellP Specifies the mobile phone number of th contact you want to add . he u mber -fax FaxNum Specifies the fax number of the contact you want to add. y a -iptel IPPhon neNumber Specifies the IP phone num mber of the contact you wan to add. nt -title Title nt Specifies the title of the contact you wan to add. tment -dept Depart

Mdulo 2

P gina 11

Specifies the department of the contact you want to add. o a ompany -company Co Specifies the company information for th contact you want to add . he u {-s Server | -d Domain} Connects to a specified rem mote server or domain. By default, the co r d omputer is co onnected to the domain con ntroller in t the logon dom main. -u UserName e Specifies the user name with which the user logs on to a remote se u erver. By defa ault, the logge on user nam is ed me n er g ollowing forma ats:user name (for example Linda)doma e e, ain\user used. You can specify a use name using one of the fo name (for exa ample, widget ts\Linda)user principal nam (UPN) (for e me example, Lind da@widgets.m microsoft.com) ) -p {Passwor | *} rd Specifies to use either a pa assword or a * to log on to a remote serv ver. If you typ *, you are prompted for a pe r password. -q e). Suppresses all output to standard output (quiet mode {-uc | -uco | -uci} Specifies that output or inp data is formatted in Unicode. The foll t put lowing table li ists and descr ribes each f format.ValueD Description-uc Specifies a Unicode forma for input fro or output to a pipe (|).c U at om -uco Specifies a s Unicode forma for output to a pipe (|) or a file. -uci Specifies a Un at t o S nicode format for input from a pipe (|) or a file. m /? and prompt. Displays help at the comma

Remarks

If you do not supply a ta arget object at the comman prompt, the target objec is obtained from standard input t nd e ct d din b oard, a redirec cted file, or as piped output from another s t (stdin). Std data can be accepted from the keybo command. To mark the end of stdin data from the keyboard or i n a redirected file, use the end-of-file ch d d haracter (CTRL+Z). If the value that you sup e pply contains spaces, use quotation mark around the text (for example, s ks e "CN=Mike Danseglio,CN=Users,DC=M Microsoft,DC=C Com"). This command only supp ports a subset of commonly used object class attribute t y es.

Examples s
T create a co To ontact named Jeff Hay in a top-level OU named Servic Dept in the fabrikam.com domain, at a ce e m command pro ompt, type the following com e mmand, and then press EN t NTER: d dsadd contact "cn=Jeff Hay,ou=serv H vice dept,dc= =fabrikam,dc c=com" T create a co To ontact named Jun Cao in th default users container, a a command prompt, typ the followin he d pe ng at command, an then press ENTER: nd d dsadd contact "cn=Jun Cao,cn=user C rs,dc=fabrika am,dc=com" "

dsa group add


A Adds a single group to the directory.

Syntax

Top of page

] d dsadd group GroupDN [-s p secgrp {yes | no}] [-scop {l | g | u}] [-samid SAMName] [-de pe esc Description] [omain}] [-u U memberof Group ...] [-me G embers Mem mber ...] [{-s Server | -d Do S UserName] [-p {Password | *}] [q [{-uc | -uc | -uci}] q] co

Paramete ers
GroupDN ecifies the dist tinguished name of the group you want t add. If the distinguished name is omit to d tted, it Required. Spe w be taken from standard input (stdin) will f d ). -secgrp {yes | no} s Specifies whe ether the group you want to add is a secu o urity group (y yes) or a distr ribution group (no). By defa ault, the group is adde as a securit group (yes). ed ty -scope {l | g | u}

Mdulo 2

P gina 12

Specifies whe ether the scope of the group you want to add is domai n local (l), glo p obal (g), or universal (u). I the If domain is in mixed-mode, then the universal scope is not supporte By default, the scope of the group is set to m ed. , global. Name -samid SAMN Specifies to use the SAM na ame as the un nique SAM acc count name fo this group ( or (for example, operators). If this parameter is not specified, it is generate from the re ed elative distingu uished name. iption -desc Descri Specifies the description of the group yo want to add f ou d. G -memberof Group ... Specifies the groups to whi this new group should be added. ich b M -members Member ... Specifies the members to add to the new group. a w {-s Server | -d Domain} Connects to a specified rem mote server or domain. By default, the co r d omputer is co onnected to the domain con ntroller in t the logon dom main. -u UserName e Specifies the user name with which the user logs on to a remote se u erver. By defa ault, -u uses the user name with e w which the use logged on. You can use any of the follo er Y a owing formats to specify a user name: u s user name (for r example, Lind da)domain\use name (for example, widg er e gets\Linda)us principal na ser ame (UPN) (fo example, or Linda@widget ts.microsoft.com) -p {Passwor | *} rd Specifies to use either a pa assword or a * to log on to a remote serv ver. If you typ *, you are prompted for a pe r password. -q e). Suppresses all output to standard output (quiet mode {-uc | -uco| -uci} Specifies that output or inp data is formatted in Unicode. The foll t put lowing table li ists and descr ribes each form mat. V ValueDescript tion-uc Specif fies a Unicode format for input from or o utput to a pip (|).-uco Sp pe pecifies a Unic code f format for out tput to a pipe (|) or a file. -uci Specifies a Unicode for rmat for input from a pipe (|) or a file. t /? and prompt. Displays help at the comma

Remarks

If you do not supply a ta arget object at the comman prompt, the target objec is obtained from standard input t nd e ct d din b oard, a redirec cted file, or as piped output from another s t (stdin). Std data can be accepted from the keybo command. To mark the end of stdin data from the keyboard or i n a redirected file, use the end-of-file ch d d haracter (CTRL+Z). If a value that you suppl contains spaces, use quo t ly otation marks around the te (for example, ext "CN=Mike Danseglio,CN=Users,DC=M Microsoft,DC=C Com"). If you supp multiple va ply alues for a par rameter, use spaces to sep parate the valu (for exam ues mple, a list of distinguished names). This command only supp ports a subset of commonly used object class attribute t y es.

Examples s
T create a gr To roup account named Techs in an OU nam med Repairs, w which is subor rdinate to the top-level OU Service Dept of the domain fabrikam.com at a comm n m, mand prompt, type the follow wing comman and then p nd, press ENTER: d p ,ou=Repairs, ,ou=Service Dept,dc=fab brikam,dc=c com" dsadd group "cn=Techs, T create a gr To roup account named Suppo in the default Users cont ort tainer of fabri ikam.com, at a command p prompt, t type the follow wing comman and then press ENTER: nd, p d dsadd group cn=Support,cn=Users,d p dc=fabrikam m,dc=com

dsadd ou d
A Adds a single organizationa unit (OU) to the directory al o y.
Top of page

Mdulo 2

P gina 13

Syntax
d dsadd ou Org ganizationalUn nitDN [-desc Description] [{-s Server | -d Domain}][-u UserName [-p {Passw [ e] word | *}] [-q] [{-uc | -uco | -uci}] -

Paramete ers
Organization nalUnitDN Required. Spe ecifies the dist tinguished name of the organizational un you want t add. If the distinguished name is nit to omitted, it will be taken fro standard in om nput (stdin). iption -desc Descri Specifies the description of the organizat f tional unit you want to add u d. {-s Server | -d Domain} Connects to a specified rem mote server or domain. By default, the co r d omputer is co onnected to the domain con ntroller in t the logon dom main. -u UserName e Specifies the user name with which the user logs on to a remote se u erver. By defa ault, the logge on user nam is ed me n er g ollowing forma ats: user nam (for example, Linda)dom me main\user used. You can specify a use name using one of the fo name (for exa ample, widget ts\Linda)user principal nam (UPN) (for e me example, Lind da@widgets.m microsoft.com) ) -p {Passwor | *} rd Specifies to use either a pa assword or a * to log on to a remote serv ver. If you typ *, you are prompted for a pe r password. -q e). Suppresses all output to standard output (quiet mode {-uc | -uco | -uci} Specifies that output or inp data is formatted in Unicode. The foll t put lowing table li ists and descr ribes each form mat. V ValueDescript tion-uc Specif fies a Unicode format for input from or o utput to a pip (|).-uco Sp pe pecifies a Unic code f format for out tput to a pipe (|) or a file. -uci Specifies a Unicode for rmat for input from a pipe (|) or a file. t /? and prompt. Displays help at the comma

Remarks
If you do not supply a ta arget object at the comman prompt, the target objec is obtained from standard input t nd e ct d din b oard, a redirec cted file, or as piped output from another s t (stdin). Std data can be accepted from the keybo command. To mark the end of stdin data from the keyboard or i n a redirected file, use the end-of-file ch d d haracter (CTRL+Z). If a value that you suppl contains spaces, use quo t ly otation marks around the te (for example, ext "OU=Doma Controllers ain s,DC=Microsoft,DC=Com"). . This command only supp ports a subset of commonly used object class attribute t y es.

Examples s
T create an OU named Service Dept in a domain nam To O med fabrikam. .com, at a com mmand promp type the fo pt, ollowing command, an then press ENTER: nd d dsadd ou "ou=Service Dept,dc=fabrikam,dc=com D m" T create an OU subordinat to the Serv To O te vice Dept nam med Repairs, a t a command prompt, type the following e g command, an then press ENTER: nd d dsadd ou "ou=Repairs,o ou=Service Dept,dc=fabr D rikam,dc=com m"

ds sadd user
A Adds a single user to the directory.

Syntax

Top of page

d dsadd user UserDN [-sam SAMName [-upn UPN] [-fn FirstNam [-mi Initi U mid e] ] me] ial] [-ln LastN Name] [-displ lay D DisplayName] [-empid Em ] mployeeID] [-p pwd {Passwor | *}] [-des Description [-member Group ...] [-office rd sc n] rof Office] [-tel PhoneNumber [-email Email] [-homete HomePhone P r] el eNumber] [-p pager PagerNu umber] [-mob bile CellPhoneNum mber] [-fax Fa axNumber] [-iptel IPPhone eNumber] [-w webpg WebPa age] [-title Tit tle] [-dept

Mdulo 2

P gina 14

Department] [-company Company] [-mgr Manager] [-hmdir HomeDirectory] [-hmdrv DriveLetter:][-profile ProfilePath] [-loscr ScriptPath] [-mustchpwd {yes | no}] [-canchpwd {yes | no}] [-reversiblepwd {yes | no}] [-pwdneverexpires {yes | no}] [-acctexpires NumberOfDays] [-disabled {yes | no}] [{-s Server | -d Domain}] [-u UserName] [-p {Password | *}] [-q] [{-uc | -uco | -uci}]

Parameters
UserDN Required. Specifies the distinguished name of the user you want to add. If the distinguished name is omitted, it will be taken from standard input (stdin). -samid SAMName Specifies the SAM name as the unique SAM account name for this user (for example, Linda). If not specified, dsadd will attempt to create SAM account name using up to the first 20 characters from the common name (CN) value of UserDN. -upn UPN Specifies the user principal name of the user you want to add, (for example, Linda@widgets.microsoft.com). -fn FirstName Specifies the first name of the user you want to add. -mi Initial Specifies the middle initial of the user you want to add. -ln LastName Specifies the last name of the user you want to add. -display DisplayName Specifies the display name of the user you want to add. -empid EmployeeID Specifies the employee ID of the user you want to add. -pwd {Password| *} Specifies the password for the user to be set to Password or *. If set to *, you are prompted for a user password. -desc Description Specifies the description of the user you want to add. -memberof GroupDN ... Specifies the distinguished names of the groups in which you want the user to be a member. -office Office Specifies the office location of the user you want to add. -tel PhoneNumber Specifies the telephone number of the user you want to add. -email Email Specifies the e-mail address of the user you want to add. -hometel HomePhoneNumber Specifies the home telephone number of the user you want to add. -pager PagerNumber Specifies the pager number of the user you want to add. -mobile CellPhoneNumber Specifies the cell phone number of the user you want to add. -fax FaxNumber Specifies the fax number of the user you want to add. -iptel IPPhoneNumber Specifies the IP phone number of the user you want to add. -webpg WebPage Specifies the Web page URL of the user you want to add. -title Title Specifies the title of the user you want to add. -dept Department Specifies the department of the user you want to add. -company Company Specifies the company information of the user you want to add. -mgr ManagerDN Specifies the distinguished name of the manager of the user you want to add. -hmdir HomeDirectory Specifies the home directory location of the user you want to add. If HomeDirectory is given as a Universal Naming Convention (UNC) path, then you must specify a drive letter to be mapped to this path using the -hmdrv parameter.

Mdulo 2

Pgina 15

-hmdrv DriveLetter : Specifies the home directory drive letter (for example, E:) of the user you want to add.. -profile ProfilePath Specifies the profile path of the user you want to add. -loscr ScriptPath Specifies the logon script path of the user you want to add. -mustchpwd {yes | no} Specifies if users must change their passwords at the time of next logon (yes) or not (no). By default, the user does not need to change the password (no). -canchpwd {yes | no} Specifies if users can change their passwords at all (yes) or not (no). By default, the user is allowed to change the password (yes). The value of this parameter must be yes if the value of the -mustchpwd parameter is yes. -reversiblepwd {yes | no} Specifies if the user password should be stored using reversible encryption (yes) or not (no). By default, the user cannot use reversible encryption (no). -pwdneverexpires {yes | no} Specifies if the user password never expires (yes) or not (no). By default, the user password does expire (no). -acctexpires NumberOfDays Specifies the number of days from today that the user account will expire. A value of 0 sets expiration at the end of today. A positive value sets expiration in the future. A negative value sets expiration in the past. The value never sets the account to never expire. For example, a value of 0 implies that the account expires at the end of today. A value of -5 implies that the account has already expired 5 days ago and sets an expiration date in the past. A value of 5 sets the account expiration date for 5 days in the future. -disabled {yes | no} Specifies if the user account is disabled for log on (yes) or enabled (no). For example, the command dsadd user CN=Nicolettep,CN=Users,DC=Widgets,DC=Microsoft,DC=Com -pwd Password1 -disabled no creates a Nicolettep user account in an enabled state. By default, the user account is disabled for log on (yes). For example, the command dsadd user CN=Nathanp,CN=Users,DC=Widgets,DC=Microsoft,DC=Com creates a Nathanp user account in a disabled state. {-s Server | -d Domain} Connects to a specified remote server or domain. By default, the computer is connected to the domain controller in the logon domain. -u UserName Specifies the user name with which the user logs on to a remote server. By default, -u uses the user name with which the user logged on. You can use any of the following formats to specify a user name: user name (for example, Linda)domain\user name (for example, widgets\Linda)user principal name (UPN) (for example, Linda@widgets.microsoft.com) -p {Password | *} Specifies to use either a password or a * to log on to a remote server. If you type *, you are prompted for a password. -q Suppresses all output to standard output (quiet mode). {-uc | -uco | -uci} Specifies that output or input data is formatted in Unicode. The following table lists and describes each format. ValueDescription-uc Specifies a Unicode format for input from or output to a pipe (|).-uco Specifies a Unicode format for output to a pipe (|) or a file. -uci Specifies a Unicode format for input from a pipe (|) or a file. /? Displays help at the command prompt.

Remarks

If you do not supply a target object at the command prompt, the target object is obtained from standard input (stdin). Stdin data can be accepted from the keyboard, a redirected file, or as piped output from another command. To mark the end of stdin data from the keyboard or in a redirected file, use the end-of-file character (CTRL+Z). If a value that you supply contains spaces, use quotation marks around the text (for example, "CN=Mike Danseglio,CN=Users,DC=Microsoft,DC=Com"). If you supply multiple values for a parameter, use spaces to separate the values (for example, a list of distinguished names). The special token $username$ (case insensitive) may replace the SAM account name in the value of the -email ,

Mdulo 2

Pgina 16

-hmdir , -p profile , and -webpg para ameters. For example, if a S e SAM account n name is "Denise," the -hmdir parameter can be written in either of the following formats: -hmdir\us sers\Denise\ \home -hmdir\us sers\$userna ame$\home e Using stron passwords on all user ac ng ccounts can he minimize s elp security risks. For more info ormation abou strong ut passwords, see Related Topics. , T

Examples s
T create a di To isabled user account named OCox in the top-level OU named Servic Dept in the fabrikam.com a d ce e m domain, at a command pro ompt, type the following com e mmand, and t then press EN NTER: d c =Service Dept,dc=fabrik kam,dc=com -disabled ye es dsadd user cn=OCox,ou= T create a us account na To ser amed ACon with a passwor of $erVice4 in the defau users conta w rd 41 ult ainer of the sa ame domain, at a command pro ompt, type the following com e mmand, and t then press EN NTER: " n=users,dc= =fabrikam,dc c=com" -pwd $erVice41 d Dsadd user "cn=ACon,cn

dsa quota add


A Adds a quota specification to a directory partition. A quota specifica q ation determin the maxim nes mum number of directory obje ects a given se ecurity princip can own in a specified d pal n directory partit tion.
Top of page

Syntax

d dsadd quota -part Partitio a onDN [-rdn RelativeDisting R guishedName] -acct Name -qlimit Value [-desc Desc ] e cription] [{-s Server | -d Domain}] [-u UserNam me][-p {Passw word | *}] [-q ] [{-uc | -uco | -uci}] o

Paramete ers
-part Partitio onDN Required. Spe ecifies the dist tinguished name of the dire ectory partitio on which yo want to cre on ou eate a quota. If you do not specify the distinguishe name, it is taken from st ed tandard input (stdin). eDistinguish hedName -rdn Relative Specifies the relative distinguished name of the quota specification being created If you do not specify -rd , it is e a d. dn n_AccountNam using the domain and account name of the securit principal sp me, a ty pecified by the -acct e set to Domain parameter. -acct Name Required. Spe ecifies the sec curity principal (user, group computer, o InetOrgPers p, or son) to whom the quota specification applies. You can use any of the following forms for Na a f g ame: Distingui ished name (a also known as DN) of s t the security principalDomain\SAMAccoun p ntName of the security prin e ncipal -qlimit Value e Required. Spe ecifies the num mber of object within the directory part ition that can be owned by the security p ts d principal. T specify an unlimited quo To ota, use -1. -desc Descri iption Specifies a de escription for the quota specification that you want to add. t t {-s Server | -d Domain} Connects the computer to either a specif e fied server or domain. By d default, the co omputer is con nnected to a d domain controller in the logon dom main. e -u UserName Specifies the user name with which user will log on to a remote ser r o rver. By defau -u uses th user name with ult, he w which the use logged on. You can use any of the follo er Y a owing formats to specify a user name: u s user name (for r example, Lind da)domain\use name (for example, widg er e gets\Linda)us principal na ser ame (UPN) (fo example, or Linda@widget ts.microsoft.com) -p {Passwor rd| *} Specifies use of a specific password or a * to log on to a remote se p o erver. If you ty ype *, you ar prompted fo a re or password. -q e). Suppresses all output to standard output (quiet mode {-uc | -uco | -uci}

Mdulo 2

P gina 17

Specifies that output or input data is formatted in Unicode. The following table lists and describes each format. ValueDescription-uc Specifies a Unicode format for input from or output to a pipe (|).-uco Specifies a Unicode format for output to a pipe (|) or a file. -uci Specifies a Unicode format for input from a pipe (|) or a file. /? Displays help at the command prompt.

Remarks
If you do not specify a target object at the command prompt, the target object is obtained from standard input (stdin). Stdin data can be accepted from the keyboard, a redirected file, or as piped output from another command. To mark the end of stdin data from the keyboard or in a redirected file, use CTRL+Z for End of File (EOF). If a value that you use contains spaces, use quotation marks around the text (for example, "CN=DC 2,OU=Domain Controllers,DC=Microsoft,DC=Com").

Examples
To specify a quota of 1000 objects for the configuration partition for user account AConn, which is in the default Users container of the fabrikam.com domain, at a command prompt, type the following command, and then press ENTER: dsadd quota -part cn=configuration,dc=fabrikam,dc=com -acct cn=aconn,cn=users,dc=fabrikam,dc=com

Formatting legend
Format Italic Bold Ellipsis (...) Meaning Information that the user must supply Elements that the user must type exactly as shown Parameter that can be repeated several times in a command line Between brackets ([]) Between braces ({}); choices separated by pipe (|). Example: {even|odd} Courier font Optional items Set of choices from which the user must choose only one Code or program output

Mdulo 2

Pgina 18

Potrebbero piacerti anche