[2024-feb-29] Sad news: Eric Layton aka Nocturnal Slacker aka vtel57 passed away on Feb 26th, shortly after hospitalization. He was one of our Wiki's most prominent admins. He will be missed.

Welcome to the Slackware Documentation Project

Diferencias

Muestra las diferencias entre dos versiones de la página.

Enlace a la vista de comparación

Ambos lados, revisión anteriorRevisión previa
Próxima revisión
Revisión previa
es:slackbook:users [2019/02/01 18:58 (UTC)] – [User and Group Management] slackwarespanoles:slackbook:users [2019/02/26 22:22 (UTC)] (actual) – [Gestionar usuarios y grupos manualmente] slackwarespanol
Línea 1: Línea 1:
-<note warning>Traducción en progreso. Victor. </note> 
-<!-- Add your text below. We strongly advise to start with a Headline (see button bar above). --> 
- 
 ====== Gestión de usuarios y grupos ====== ====== Gestión de usuarios y grupos ======
-===== What Are Users and Groups? ===== +===== ¿Qué son los usuarios y los grupos? =====
- +
-Slackware Linux inherits a strong multi-user tradition from its UNIX +
-inspiration. This means that multiple people may use the system at +
-once, but it also means that each of these people may have different +
-permissions. This allows users to prevent others from modifying their +
-files, or lets system administrators explicitly define what users can +
-and cannot do on the system. Moreover, users need not be actual people +
-at all. In fact, Slackware includes several dozen pre-defined user +
-and group accounts that are not typically used by regular users. Rather +
-these accounts allow the system administrator to segment the system for +
-security reasons. We'll see how that's done in the next chapter on +
-filesystem permissions. +
-===== Managing Users and Groups ===== +
-=== Adding users and groups ===+
  
-The easiest way to add new users in Slackware is through the use of our +Slackware Linux hereda una fuerte tradición multiusuario de su inspiración UNIXEsto significa que varias personas pueden usar el sistema a la vez, pero también significa que cada una de estas personas puede tener diferentes permisosEsto permite los usuarios evitar que otros modifiquen sus archivos, o permite a los administradores del sistema definir explícitamente lo que los usuarios pueden y no pueden hacer en el sistemaAdemás, los usuarios no necesitan ser personas reales en absoluto. De hecho, Slackware incluye varias docenas de cuentas de usuarios y grupos predefinidas que los usuarios normales no suelen utilizar. Más bien, estas cuentas permiten al administrador del sistema segmentar el sistema por razones de seguridad. Veremos cómo se hace en el siguiente capítulo sobre permisos de sistemas de archivos. 
-very fine **//adduser//** shell script. +===== Administrar usuarios y grupos ===== 
-**//adduser//** will prompt you to enter the details +=== Añadiendo usuarios y grupos ===
-of the new user you wish to create and step you through the process +
-quickly and easilyIt will even create password for the new user.+
  
 +La forma más fácil de agregar nuevos usuarios en Slackware es mediante el uso de nuestro muy fino shell script** // adduser// **. ** // adduser // ** le pedirá que ingrese los detalles del nuevo usuario que desea crear y lo guiará a través del proceso de manera rápida y sencilla. Incluso creará una contraseña para el nuevo usuario.
  
 <file> <file>
Línea 93: Línea 75:
  
  
-The addition of optional groups needs a little explainingEvery user +La adición de grupos opcionales necesita un poco de explicaciónCada usuario en Slackware tiene un solo grupo del que siempre es miembroPor defectoeste es el // grupo "usuarios"//Sin embargolos usuarios pueden pertenecer más de un grupo a la vez y heredarán todos los permisos de cada grupo al que pertenecenLos usuarios de escritorio típicos deberán agregar varias membresías de grupo para hacer cosas como reproducir sonido o acceder a medios extraíbles como cdroms o unidades flash USB. Simplemente puede presionar la tecla de flecha hacia arriba en esta sección y aparecerá mágicamente una lista de grupos predeterminados para usuarios de escritorioPor supuestopuede agregar o eliminar grupos de este listado.
-in Slackware has a single group that it is always a member ofBy +
-defaultthis is the //"users"// groupHoweverusers can belong to more +
-than one group at time and will inherit all the permissions of every +
-group they belong toTypical desktop users will need to add several +
-group memberships in order to do things like play sound or access +
-removeable media like cdroms or USB flash drivesYou can simply press +
-the up arrow key at this section and a list of default groups for +
-desktop users will magically appearYou can of courseadd to or +
-remove groups from this listing.+
  
  
-Now that we've demonstrated how to use the interactive +Ahora que hemos demostrado cómo usar el programa interactivo ** // adduser// **, veamos algunas herramientas poderosas no interactivas que quizás desee utilizarEl primero es ** // useradd // ** (8). ** // useradd // ** es un poco menos amigablepero mucho más rápido para crear usuarios en lotesEsto lo hace ideal para su uso en shell scripts. De hecho, ** // adduser // ** es un script de shell de este tipo y utiliza ** // useradd // ** para la mayor parte del trabajo pesado. ** // useradd // ** tiene muchas opciones y no podemos explicarlas todas aquíasí que consulte su página de manual para obtener todos los detallesAhorahagamos un nuevo usuario.
-**//adduser//** programlets look at some powerful +
-non-interactive tools that you may wish to useThe first is +
-**//useradd//**(8). +
-**//useradd//** is a little less friendlybut much +
-faster for creating users in batchesThis makes it ideal for use in +
-shell scripts. In fact, **//adduser//** is just such +
-a shell script and uses **//useradd//** for most of +
-the heavy lifting. **//useradd//** has many options +
-and we can't explain them all hereso refer to its man page for the +
-complete detailsNowlet's make a new user. +
  
 <code> <code>
Línea 123: Línea 85:
  
  
-Here I have added the user //"alan"//I specified the user's home +Aquí he añadido el usuario // "alan" //. Especifiqué el directorio de inicio del usuario como '' /data/home/alan '' y utilicé ** // bash // ** como mi shell. Ademásespecifiqué mi grupo predeterminado como // "users" // y me agregué una serie de grupos útiles para uso dekstop. Notará que ** // useradd // ** no realiza ninguna solicitud como ** // adduser // **. A menos que desee aceptar los valores predeterminados para tododeberá indicar a ** // useradd // ** qué hacer.
-directory as ''/data/home/alan'' and used +
-**//bash//** as my shell. AlsoI specified my +
-default group as //"users"// and added myself to number of useful groups +
-for dekstop use You'll note that **//useradd//** +
-does not do any prompting like **//adduser//**. +
-Unless you want to accept the defaults for everythingyou'll need to +
-tell **//useradd//** what to do.+
  
  
-Now that we know how to add userswe should learn how to add groups. +Ahora que sabemos cómo agregar usuariosdebemos aprender cómo agregar gruposComo habrá adivinadoel comando para hacer esto es ** // groupadd // ** (8). ** // groupadd // ** funciona de la misma manera que ** // useradd // **, pero con muchas menos opcionesEl siguiente comando agrega el grupo // "slackers" // al sistema.
-As you might have guessedthe command for doing this is +
-**//groupadd//**(8). +
-**//groupadd//** works in the same way as +
-**//useradd//**, but with far fewer optionsThe +
-following command adds the group //"slackers"// to the system.+
  
  
Línea 146: Línea 96:
  
  
-Deleting users and groups is easy as wellSimply run the +Eliminar usuarios y grupos también es fácilSimplemente ejecuta el comando** // userdel // ** (8) y/o ** // groupdel // ** (8). Por defecto, ** // userdel // ** dejará el directorio de inicio del usuarioen el sistemaPuede eliminar esto con el argumento // - r //. 
-**//userdel//**(8) and +===== Otras herramientas de usuario y grupo =====
-**//groupdel//**(8) commandsBy default, +
-**//userdel//** will leave the user's home directory +
-on the systemYou can remove this with the //-r// argument+
-===== Other User and Group Tools =====+
  
-Several other tools exist for managing users and groupsPerhaps the +Existen varias otras herramientas para la gestión de usuarios y gruposQuizás el más importante es ** // passwd // ** (1). Este comando cambia la contraseña de una cuenta de usuarioLos usuarios normales pueden cambiar sus propias contraseñas solamentepero root puede cambiar la contraseña de cualquier personaAdemás, root puede bloquear una cuenta de usuario con la opción //-l //. En realidad, esto no cierra la cuentasino que cambia la contraseña cifrada del usuario un valor que no se puede comparar.
-most important one is **//passwd//**(1). This +
-command changes a user account's passwordNormal users may change +
-their own passwords onlybut root can change anyone's passwordAlso, +
-root can lock a user account with the //-l// argumentThis +
-doesn't actually shutout the accountbut instead changes the user'+
-encrypted password to value that can't be matched.+
  
- +La forma más sencilla de modificar la información de un usuario es la utilidad ** // usermod // ** (8) que es capaz de modificar todo, desde la membresía de un grupo hasta los directorios principalesNo se proporcionará una lista completa de sus características aquíasí que consulte la página de manual. ** // usermod // ** es quizás la mejor herramienta para usar para modificar los miembros del grupo de un usuarioLas opciones // - s // // - G // logran esto.
-The easiest way for modifying a user's information is the +
-**//usermod//**(8) utility which is capable of +
-modifying everything from group membership to home directoriesA full +
-listing of its features won't be given hereso check the man page. +
-**//usermod//** is perhaps the best tool to use for +
-modifying a user's group members The //-s// and //-G// +
-arguments accomplish this.+
  
  
Línea 177: Línea 110:
  
  
-It important to note the differences in the two commands above The +Es importante tener en cuenta las diferencias en los dos comandos anterioresEl primer comando agrega el usuario // "alan" // al grupo "wheel" sin modificar ningún otro grupo // al que pertenece "alan" //. El segundo comando también hace de // "alan" // un miembro del grupo //"wheel"//, pero también elimina la membresía del usuario de cualquier otro grupo¡algo que rara vez querrá hacer!
-first command adds the user //"alan"// to the "wheel" group without +
-modifying any other groups //"alan"// belongs toThe second command also +
-makes //"alan"// a member of the //"wheel"// groupbut also removes the user'+
-membership from any other groupssomething you will very rarely want +
-to do!+
  
 +Otra herramienta útil es ** // chsh // ** (1) que cambia el shell predeterminado de un usuario. Al igual que ** // passwd // **, los usuarios normales solo pueden cambiar su propio shell, pero el usuario root puede cambiar el de cualquier persona.
  
-Another useful tool is **//chsh//**(1) which changes a +La última herramienta que vamos a discutir es ** // chfn // ** (1). Esto se utiliza para ingresar información de identificación sobre el usuario, como su número de teléfono y su nombre real. Esta información se almacena en el archivo '' passwd '' (5) y se recupera utilizando ** // finger // ** (1).
-user's default shellLike **//passwd//**, normal +
-users can only change their own shell, but the root user can change +
-anyone's.+
  
 +===== Gestionar usuarios y grupos manualmente =====
  
-The last tool we're going to discuss is +Como la mayoría de las cosas en Slackware Linux, los usuarios y grupos se almacenan en archivos de texto sin formatoEsto significa que puede editar todos los detalles de un usuarioo incluso crear un nuevo usuario o grupo simplemente editando estos archivos y realizando otras tareascomo crear el directorio de inicio del usuarioPor supuestodespués de ver cómo se hace estoapreciará lo simples que son las herramientas incluidas para hacer esta tarea.
-**//chfn//**(1). This is used to enter identifying +
-information on the user such as his phone number and real name. This +
-information is stored in the ''passwd''(5) file and +
-retrieved using **//finger//**(1). +
- +
-===== Managing Users and Groups Manually ===== +
- +
-Like most things in Slackware Linux, users and groups are stored in +
-plain-text filesThis means that you can edit all the details of a +
-useror even create a new user or group simply by editing these files +
-and doing a few other tasks like creating the user's home directory. Of +
-courseafter you see how this is done you'll appreciate just how +
-simple the included tools make this task. +
- +
- +
-Our first stop is the ''/etc/passwd'' file. Hereall +
-the information about a user is storedexcept for (oddly enough) the +
-user's password. The reason for this is rather simple. +
-''/etc/passwd'' must be readable by all users on the +
-system, so you wouldn't want passwords stored there, even if they are +
-encrypted. Let's take a quick look at my entry in this file.+
  
 +Nuestra primera parada es el archivo '' /etc/passwd ''. Aquí, toda la información sobre un usuario se almacena, excepto por (lo bastante extraña) la contraseña del usuario. La razón de esto es bastante simple. '' /etc/passwd '' debe ser legible por todos los usuarios del sistema, por lo que no querrá que las contraseñas se almacenen allí, incluso si están cifradas. Echemos un vistazo rápido a mi entrada en este archivo.
  
 <file> <file>
Línea 221: Línea 128:
  
  
-Each line in this file contains a number of fields seperated by a +Cada línea de este archivo contiene varios campos separados por dos puntosSonde izquierda a derechanombre de usuariocontraseña, UID, UIDcampo de comentariosdirectorio de inicio y shell. Notará que el campo de contraseña para cada entrada es una <key> 'x' </key>Esto se debe a que Slackware usa contraseñas ocultaspor lo que la contraseña cifrada real se almacena en ''/etc/shadow''Echemos un vistazo allí.
-colonThey arefrom left to rightusernamepassword, UID, GUID+
-comment fieldhome directory, and shell. You'll notice that the +
-password field for every entry is an <key>'x'</key>That is +
-because Slackware uses shadow passwordsso the actual encrypted +
-password is stored in ''/etc/shadow''Let's take a +
-look there.+
  
  
Línea 236: Línea 137:
  
  
-The ''shadow'' file contains more than just the +El archivo ''shadow'' contiene algo más que la contraseña cifrada, como se dará cuentaLos campos aquíde nuevo de izquierda a derechasonnombre de usuariocontraseña encriptadaúltimo día en que se cambió la contraseñadías antes de que la contraseña pueda ser cambiada de nuevocuántos días antes de que caduque la contraseñalos días en que la cuenta se desactivará después de que caduque cuando la cuenta fue deshabilitaday un campo reservadoPuede observar en algunas cuentas que el campo // "días" // a menudo incluyen números muy grandesLa razón de esto es que Slackware cuenta el tiempo desde // "Epoch" // que es el de enero de 1970 por razones históricas.
-encrypted password as you'll noticeThe fields hereagain from left +
-to rightareusernameencrypted passwordlast day the password was +
-changeddays before the password may be changed againhow many days +
-before the password expiresdays that the account will be disabled +
-after expiringwhen the account was disabledand a reserved field. +
-You may notice on some accounts that the various //"days"// fields often +
-include very large numbersThe reason for this is that Slackware +
-counts time from the //"Epoch"// which is January 11970 for historical +
-reasons. +
  
-To create a new user account, you'll just need to open these files 
-using **//vipw//**(8). This will open 
-''/etc/passwd'' in the editor 
-defined by your VISUAL variable or your EDITOR variable if VISUAL isn't 
-defined. If neither is present, it will fall back to 
-**//vi//** by default. If you pass the //-s// 
-argument, it will open ''/etc/shadow'' instead. It's 
-important to use **//vipw//** instead of using any 
-other editor, because **//vipw//** will lock the 
-file and prevent other programs from editing it right underneath your feet. 
  
 +Para crear una nueva cuenta de usuario, solo tendrá que abrir estos archivos usando ** // vipw // ** (8). Esto abrirá ''/etc/passwd'' en el editor definido por su variable VISUAL o su variable EDITOR si VISUAL no está definido. Si ninguno de los dos está presente, volverá a ** // vi // ** por defecto. Si pasa el argumento // - s //, se abrirá ''/etc/shadow'' en su lugar. Es importante usar ** // vipw // ** en lugar de usar cualquier otro editor, porque ** // vipw // ** bloqueará el archivo e impedirá que otros programas lo editen justo cuando usted lo está haciendo.
  
-That isn't all you'll need to do howeveryou must also create the +Eso no es todo lo que tendrás que hacer sin embargotambién debes crear el directorio de inicio del usuario y cambiar la contraseña del usuario utilizando ** // passwd // **.
-user's home directory and change the user's password using +
-**//passwd//**.+
  
-====== Chapter Navigation ======+===== Navegación de capítulos ======
  
-**Previous Chapter: [[slackbook:printing|Printing]]**+**Capítulo anterior: [[:es:slackbook:printing|Impresión]]**
  
-**Next Chapter: [[slackbook:filesystem_permissions|Filesystem Permissions]]**+**Capítulo siguiente: [[:es:slackbook:filesystem_permissions|Permisos del sistema de archivos]]**
  
-====== Sources ======+====== Fuentes ======
 <!-- If you copy information from another source, then specify that source --> <!-- If you copy information from another source, then specify that source -->
-  * Original source: [[http://www.slackbook.org/beta]] \\+  * Fuente original: [[http://www.slackbook.org/beta]] \\
 <!-- Authors are allowed to give credit to themselves! --> <!-- Authors are allowed to give credit to themselves! -->
-  * Originally written by Alan Hicks, Chris Lumens, David Cantrell, Logan Johnson+  * Escrito originalmente por Alan Hicks, Chris Lumens, David Cantrell, Logan Johnson 
 +  * Traducido por:  [[wiki:user: slackwarespanol | Victor]] 2019/02/01 20:04 (UTC)
 <!-- * Contrbutions by [[wiki:user:yyy | User Y]] --> <!-- * Contrbutions by [[wiki:user:yyy | User Y]] -->
  
 es:slackbook:users ()