You don't have access to this class

Keep learning! Join and start boosting your career

Aprovecha el precio especial y haz tu profesión a prueba de IA

Antes: $249

Currency
$209
Suscríbete

Termina en:

0 Días
5 Hrs
0 Min
19 Seg

¿Qué son los grupos y usuarios en Linux?

4/16
Resources

How does Linux manage groups and users?

Understanding how Linux handles users and groups is essential to taking full advantage of the security and organization of the operating system. With a structure designed to grant detailed permissions and monitor actions, Linux ensures that each user has access to the appropriate resources while maintaining the integrity of the system.

What is a user in Linux?

In Linux, users are a mechanism for separating and managing system responsibilities and permissions. Each user:

  • UID (User ID): A unique identifier that differentiates each user within the system.
  • GID (Group ID): Associations to one or more groups to coordinate collective permissions.
  • Home directory: A custom location within the system, such as /home/username, where your personal files and settings are stored.

These features allow precise control over who can access what resources and perform certain actions on the system.

What is the purpose of the passwd file?

The passwd file, located in the /etc folder, is essential for user management in Linux. This file contains relevant information about each user on the system:

  • File format:
    name:password:userID:groupID:gecos:home_directory:shell_startup.
    • Name: Identifier of the user.
    • Password: Represented by an 'X', since it is not stored in plain text.
    • UserID and GroupID: Unique identifiers.
    • Gecos: Additional information about the user, such as full name and contact.
    • Home directory: User's personal path.
    • Preferred shell: The shell that is run at login, such as bash or zsh.

It is run only by users with administrative privileges.

How are passwords protected in Linux?

Password security in Linux is managed through the shadow file, which stores passwords in encrypted form:

  • Advanced encryption: thanks to secure hash algorithms, passwords are stored without the possibility of being read directly.
  • Special indicators:
    • Asterisk ('*'): Indicates that the user has never had a password.
    • Exclamation mark ('!'): Signals that the user has been locked out.

This approach ensures that passwords are protected even if the file is compromised.

What is the role of groups in Linux?

Groups are a powerful tool for controlling collective permissions among several users:

  • Shared access: They facilitate shared access to directories and documents among users in the same group.
  • Integration with services: Many external services, such as Docker or Postgres, use groups to manage execution permissions.

The correct management of groups allows an efficient administration of permissions and access to resources, optimizing the security and functionality of the system.

Starting your journey into user and group management in Linux will not only give you greater control of your environment, but will also equip you with the skills necessary to maintain a secure and well-organized system. As you delve deeper, you will discover how these concepts are the foundation of a robust and flexible Linux ecosystem. Continue to learn and explore new opportunities that this knowledge can offer!

Contributions 7

Questions 0

Sort by:

Want to see more contributions, questions and answers from the community?

Usuario:
Nos permite separar las responsabilidades y permisos de acciones en el sistema. Dependiendo los permisos que tengan son las acciones que podrán ejecutar.

Características:
UID: Identificador único del sistema
GIDs: uno o más IDs que los relacionan a un grupo
Directorio Home: está en la ruta /home/<username>
Archivos /etc/passwd: contiene info de nuestros usuarios en formato name:password:UID:GID:GECOS:directory:shell
GECOS: info extra
SHELL: la shell de inicio
/etc/shadow: contraseña de forma sifrada, si contiene un asterico * significa que jamas tuvo una contraseña asignada, si contiene un simbolo de exclamacion ! ha sido bloqueado

Grupos: Agrupan usuario y conjunto de permisos, estos son muy usados por servicios como demonios, docker, postgres, etc

Aquí comparto un artículo muy interesante sobre el archivo shadow y cómo leer la información almacenada aquí.
Link: https://linuxize.com/post/etc-shadow-file/

**/etc/passwd **contiene información básica de los usuarios del sistema, como el nombre de usuario, UID, GID, directorio home, y el shell predeterminado. Esta información es accesible para todos los usuarios del sistema, lo que significa que cualquier usuario puede ver esta información si tiene acceso al archivo.

** /etc/shadow** contiene información más sensible sobre los usuarios del sistema, como la información de la contraseña (encriptada) y los datos de vencimiento de la contraseña. Este archivo es solo accesible por el usuario root y los usuarios con privilegios especiales, lo que significa que los usuarios normales no pueden ver esta información.

/etc/shadow: Contiene información de las contraseñas de usuario de forma cifrada. (*) Si el campo password tiene un *, entonces el usuario nunca ha tenido contraseña (*) Si el campo password tiene un !, entonces el usuario ha sido bloqueado

archivo /etc/passwd: contiene información de usuarios en el siguiente formato name:password:UID:GID:GECOS:directory:shell

Que son los usuarios y los grupos
Los usuarios tienen asignados una serie de accesos y responsabilidades que les permiten ejecutar acciones en los archivos y carpetas en funcion al acceso que se les fue asignado.

Los grupos a diferencia de los usuarios tienen ciertos niveles de permisos en los cuales se agrupan diferentes tipos usuarios para otorgar niveles de jerarquia de acceso a carpetas espeficas en las que se esta ejecutando un trabajo o un proyecto en especifico…

Es interesante el uso de los grupos y usuarios. Esto sera interesante al momento de aplicarlo en la chamba.