Usuarios y grupos

Proveedores de cuentas

NethServer soporta autenticación y autorización contra un proveedor de cuentas local o remoto

Los tipos de proveedores compatibles son:

  • OpenLDAP local corriendo en el propio NethServer

  • Servidor LDAP remoto con esquema RFC2307

  • Controlador local de Active Directory de Samba 4

  • Active Directory remoto (Microsoft y Samba)

Only the root user can configure an account provider from the Users & Groups page. Configuration of the account provider cannot be delegated.

Tenga precaución con la siguiente regla sobre el proveedor de cuentas:

Una vez que NethServer ha estado vinculado a un proveedor de cuentas, el FQDN no se puede cambiar más

Proveedores remotos

After NethServer has been bound to a remote account provider the User & groups page shows a read-only list of domain accounts.

Proveedores locales

Después de instalar un proveedor local (ya sea Samba 4 o OpenLDAP), el administrador puede crear, modificar y eliminar los usuarios y grupos.

Advertencia

Por favor, elige correctamente el proveedor de cuentas, ya que, ésa opción, podría ser irreversible. Además, el sistema podría rechazar cualquier cambio en el FQDN después de que el proveedor de cuentas se haya configurado.

Elegir el proveedor de cuenta correcto

Besides choosing to bind a remote provider or install a local one, the administrator has to decide which backend type suits his needs.

The File server application of NethServer, which enables the File server > Shared folders page, can authenticate SMB/CIFS clients only if NethServer is bound to an Active Directory domain. The LDAP providers allow access to shared folders only in guest mode. See Carpetas compartidas.

Por otro lado, el proveedor local de OpenLDAP es más fácil de instalar y configurar.

Al final, si no se requiere el soporte para el protocolo de intercambio de archivos SMB, un proveedor LDAP es la mejor opción.

Instalación del proveedor local de OpenLDAP

To install and configure an OpenLDAP local accounts provider, go to page Users & Groups > [Configure the account provider] > LDAP > Install local LDAP. The system needs a working internet connection to download additional packages.

Al finalizar la instalación, el paquete es configurado automáticamente y el administrador podrá administrar los User and groups.

Consulta la sección Cuenta de administrador para más detalles sobre los usuarios y grupos administrativos.

Advertencia

The NethServer OpenLDAP account provider does not fully support the user password expiration. Refer to Efectos de contraseñas caducadas for more information

Instalación del proveedor local de Active Directory de Samba

Durante el proceso de instalación de Samba Active Directory como proveedor de cuentas local, el sistema necesitará un direccíon IP adicional y una conexión a Internet estable.

El IP adicional se asigna a un contenedor Linux que ejecuta las funciones de controlador de dominio de Active Directory y debe ser accesible desde la LAN (red verde).

Por lo tanto, la dirección IP adicional debe satisfacer tres condiciones:

  1. La dirección IP tiene que ser libre; no debe ser utilizada por ninguna otra máquina

  2. La dirección IP debe estar en el mismo rango de subred de una red verde

  3. La red verde debe ser montada sobre una interfaz puente donde un contenedor Linux puede unir la interfaz virtual. El proceso de instalación podría crear esa interfaz puente automáticamente si ésta no existe

To install a local Active Directory accounts provider, go to page Users & Groups > [Configure the account provider] > Active Directory > Create domain and become DC.

The Domain name defines the DNS suffix of the new domain. NethServer acts as an authoritative DNS server for that domain. See also DNS and AD domain.

The NetBIOS domain name (also known as «domain short name», «NT domain name») is the alternative Active Directory domain identifier, compatible with older clients. See also Network access.

The DC IP address field must be filled with the additional IP address explained above.

When all fields are filled, press the Create domain button.

Advertencia

The Active Directory Domain name and NetBIOS domain name values cannot be changed once that the domain has been created

El procedimiento de configuración de Active Directory puede requerir algún tiempo para ejecutarse. Crea el chroot del Contenedor de Linux, descargando paquetes adicionales.

The Linux Container root directory is /var/lib/machines/nsdc/ and requires the filesystem support to Posix ACLs. The default XFS filesystem has a builtin support for Posix ACLs and no special configuration is required. For other filesystems (i.e. EXT4) enable the ACLs as explained in Shared folders requirements.

At the end of the procedure, the NethServer host machine automatically joins the new Active Directory domain.

The previously assigned IP address can be changed from Users & Groups > Account provider > [Details] > Active Directory IP.

Advertencia

Changing the Domain Controller IP address can cause problems to Active Directory clients. If they use an external DNS server, update it to use the new IP address.

After installing Samba Active Directory, the Users & groups page has two default entries; both are disabled: administrator and admin. «Administrator» is the default Active Directory privileged account and is not required by NethServer; it is safe to keep it disabled. «admin» is defined by NethServer as the default system administrative account. It is member of the AD «domain admins» group. See Cuenta de administrador section for more details.

DNS and AD domain

An Active Directory domain requires a reserved DNS domain to work. It is a good choice to allocate a subdomain of the public DNS domain for it. The AD subdomain can be accessible only from LAN (green) networks.

Example:

  • public (external) domain: nethserver.org

  • server FQDN: mail.nethserver.org

  • Active Directory (internal LAN only) domain: ad.nethserver.org

  • domain controller FQDN (assigned by default): nsdc-mail.ad.nethserver.org

Truco

When choosing a domain for Active Directory use an internal domain which is a subdomain of the external domain 1

1

https://social.technet.microsoft.com/wiki/contents/articles/34981.active-directory-best-practices-for-internal-domain-and-network-names.aspx#Recommendation

Instalación en una máquina virtual

Samba Active Directory se ejecuta dentro de un contenedor Linux que utiliza una interfaz de red virtual puenteada a la interfaz de red del sistema. La interfaz de red virtual debe ser visible dentro de la red física, pero a menudo las soluciones de virtualización bloquean el tráfico ARP. Como resultado, el contenedor de Active Directory de Samba no es visible desde hosts en LAN.

Al instalar en un entorno virtual, asegúrese de que la solución de virtualización permite el tráfico en modo promiscuo.

VirtualBox

Para configurar la política de modo promiscuo, seleccione «Permitir todo» en la lista desplegable ubicada en la sección de configuración de red.

VMWare

Introduzca la sección de configuración de red del modo de virtualización y establezca el conmutador virtual en modo promiscuo.

KVM

Asegúrese de que la máquina virtual está conectada a un puente real (como br0) y el puente se pone en modo promiscuo.

Es posible forzar un puente (es decir br0) en modo promiscuo usando este comando:

ifconfig br0 promisc
Hyper-V

Configure MAC Address Spoofing for Virtual Network Adapters 2

2

https://technet.microsoft.com/en-us/library/ff458341.aspx

Unirse a un dominio de Active Directory existente

Aquí NethServer está enlazado a un proveedor de cuenta de Active Directory remoto. Puede ser proporcionado por implementaciones de Samba o Microsoft. En este escenario NethServer se convierte en un servidor de confianza de un dominio de Active Directory existente. Al acceder a un recurso NethServer de una estación de trabajo del dominio, las credenciales de usuario se comprueban contra uno de los controladores de dominio y se concede el acceso al recurso.

Joining an Active Directory domain has the following pre-requisite:

El protocolo Kerberos requiere que la diferencia entre los relojes de los sistemas en la red sea inferior a 5 minutos. Configure los clientes de red para alinear sus relojes a una fuente de hora común. Para NethServer Vaya a la página Fecha y hora.

After the prerequisite is fulfilled, proceed to the page Users & Groups > [Configure the account provider] > Active Directory > Join existing Domain Controller.

  • Enter the Domain name of the AD domain. Press the Check button

  • If required, fill the AD DNS server field. Usually it is the IP address of an AD domain controller. Press Check again.

  • Provide the Username and Password of an AD account with the privilege of joining a computer to the domain. Remember that the default administrator account could be disabled! Press Check again.

  • If the credentials are valid complete the procedure by pressing Next.

Some applications require an additional configuration step. See also LDAP account for additional applications.

Vincular a un servidor LDAP remoto

To configure a remote LDAP accounts provider, go to page Users & Groups > Configure the account provider > LDAP > Bind remote LDAP.

Type the LDAP server IP address in the field Hostname or IP. If the LDAP service runs on a non-standard TCP port, specify it in TCP port. Press the Check button to proceed.

Then an LDAP rootDSE query is sent to the specified host and a form is filled with returned data. Check the values are correct then press the Check button again.

If the LDAP server requires authentication, set Bind Type to Authenticated. Set either ldaps:// in Service URI or enable StartTLS to encrypt the connection.

Truco

If the remote LDAP server is also a NethServer installation and it is in the LAN (green) network, select Anonymous bind

Some applications require an additional configuration step. See also LDAP account for additional applications.

LDAP account for additional applications

Some additional applications, like Nextcloud, WebTop, Roundcube, Ejabberd, require a read-only and dedicated user account to perform simple LDAP binds.

For this purpose, the builtin ldapservice account is automatically created in local account providers with limited privileges. Its Bind password and full Bind DN are shown under Users & Groups > Account provider > [Details]. It is recommended to use those credentials to connect external systems to the account provider.

On the other hand, if NethServer is bound to a remote account provider follow these steps:

  1. Create a dedicated user account in the remote AD or LDAP provider, then set a complex and non-expiring password for it. As said above, if the remote provider is a NethServer too, it already provides ldapservice for this purpose.

  2. Once NethServer is successfully bound to a remote AD or LDAP account provider, specify the dedicated user account credentials in Users & Groups > Account provider > Edit provider > Authentication credentials for LDAP applications.

  3. If the remote account provider supports TLS, it is recommended to enable the StartTLS option or use the ldaps:// URI scheme in the Service URI input field to avoid sending clear-text passwords over the network.

Advertencia

The NethServer AD accounts provider supports TLS. MS-Windows AD might require additional setup to enable TLS.

Changing account provider

The configured account provider can be removed by root from Users & Groups > Account provider > Change provider.

When the account provider has been removed, existing files owned by users and groups must be removed manually. This is the list of system directories containing users and groups data:

/var/lib/nethserver/home
/var/lib/nethserver/vmail
/var/lib/nethserver/ibay
/var/lib/nethserver/nextcloud

Furthermore, if the account provider is local any user, group and computer account is erased. A list of users and groups in TSV (Tab Separated Values) format is dumped to /var/lib/nethserver/backup/users.tsv and /var/lib/nethserver/backup/groups.tsv. See also Import and delete accounts from plain-text files.

Usuarios

If a remote AD or LDAP account provider was configured, the Users & Groups page shows read-only lists. It is not possible to modify or delete users and groups from the Server Manager.

On the other hand, if a local AD or LDAP account provider was installed, the Users & Groups page allows to create, modify and delete users and groups.

A newly created user remains locked until it has set a password. Disabled users are denied to access system services.

When creating a user, the following fields are mandatory:

  • Nombre de usuario

  • Nombre completo (nombre y apellido)

A user can be added to one or more groups.

Sometimes you need to block user access to services without deleting the account. The safest approach is:

  1. (optionally) change the user’s password with a random one

  2. lock the user using the Lock action

Nota

When a user is deleted with a local account provider, the home directory and personal mail box are deleted too.

Cambio de la contraseña

Users can change their password from the /user-settings web page. To enable it see User settings page.

Si el sistema esta unido a un proveedor de cuentas de Active Directory, los usuario pueden cambiar su contraseña usando las herramientas de Windows. En este caso ud. no puede configurar contraseñas de menos de 6 caracteres sin importar las políticas del servidor. Los chequeos preliminares de windows envían la contraseña al servidor donde son evaluados de acuerdo a políticas configuradas.

Credenciales de servicios

The user’s credentials are the user name and their password. Credentials are required to access the services installed on the system.

El nombre de usuario se puede emitir en dos formas: largo (predeterminado) y corto. El formulario largo siempre es aceptado por los servicios. Depende del servicio aceptar también el formulario corto.

Por ejemplo si el dominio es example.com y el usuario es goofy:

User long name form

goofy@example.com

User short name form

goofy

Para acceder a una carpeta compartida, vea también Network access.

User home directories

User home directories are stored inside the /var/lib/nethserver/home directory, in order to simplify the deployment of a single-growing partition system.

The administrator can still restore the well-known /home path using the bind mount:

echo "/var/lib/nethserver/home       /home   none    defaults,bind   0 0" >> /etc/fstab
mount -a

Grupos

A group of users can be granted some permission, such as authorize access to SSH or over a shared folder. The granted permission is propagated to all group members.

The root user can delegate some Server Manager pages to a group, with the Delegations action of Users & Groups > List > [Groups].

See also

Cuenta de administrador

Si se instala un proveedor local de AD o LDAP, se crea automáticamente un usuario admin, miembro del grupo administradores del dominio. Esta cuenta permite acceder a todas las páginas de configuración dentro del Administrador del servidor. El acceso está inicialmente deshabilitado y no tiene acceso desde la consola.

Truco

To enable the admin account, just set its password

Cuando se aplica, la cuenta admin tiene privilegios especiales en algunos servicios específicos, como unirse a una estación de trabajo a un dominio de Active Directory.

La gestión de grupos está disponible desde la línea de comandos a través de los eventos group-create y group-modify

Si un usuario o grupo con un propósito similar ya está presente en la base de datos del proveedor de cuentas remotas, pero se denomina de forma diferente, NethServer puede ser configurado para confiar en él con los siguientes comandos:

config setprop admins user customadmin group customadmins
/etc/e-smith/events/actions/system-adjust custom

Gestión de contraseñas

The system provides the ability to set constraints on password complexity and expiration for local account providers.

Password policies can be changed from the Users & Groups page of the Server Manager.

Complejidad

La complejidad de la contraseña es un conjunto de condiciones mínimas para que la misma sea aceptada por el sistema: Puede elegir entre dos políticas de administración diferentes sobre la complejidad de la contraseña:

  • none: no hay control específico sobre la contraseña introducida, pero la longitud mínima es de 7 caracteres

  • strong

La directiva strong requiere que la contraseña cumpla con las siguientes reglas:

  • Longitud mínima de 7 caracteres

  • Contiene al menos 1 número

  • Contiene al menos 1 carácter en mayúscula

  • Contiene al menos 1 carácter minúscula

  • Contiene al menos 1 carácter especial

  • Al menos 5 caracteres diferentes

  • No debe estar presente en los diccionarios de palabras comunes

  • Debe ser diferente del nombre de usuario

  • No se pueden realizar repeticiones de patrones formados por 3 o más caracteres (por ejemplo, la contraseña As1.$ AS1. $ No es válida)

  • Si se instala Samba Active Directory, también el sistema habilitará el historial de contraseñas

La directiva predeterminada es: dfn:strong.

Advertencia

El cambio de las políticas predeterminadas es contraindicado. El uso de contraseñas débiles a menudo conduce a servidores comprometidos por atacantes externos.

Vencimiento

The password expiration is NOT enabled by default.

Each time a user changes his password, the date of the password change is recorded and, if the Force periodic password change option is enabled, the password is considered expired when the Maximum password age has elapsed.

For example, given that

  • last password was set in January,

  • in October the Maximum password age is set to 180 days and Force periodic password change is enabled

thus the password is immediately considered expired (January + 180 days = June!).

Efectos de contraseñas caducadas

Advertencia

no email notification related to password expiration is sent by the server!

The effects of an expired password depend on the configured accounts provider.

When a password is expired

  • with Active Directory (both local and remote) a user cannot authenticate himself with any service;

  • with a NethServer LDAP accounts provider (both local and remote) some services ignore the password expiration and grant access in any case.

Examples of services that do not fully support the password expiration with NethServer LDAP accounts provider:

  • NextCloud

  • WebTop (contacts and calendars are available)

  • SOGo

…and other services that authenticate directly with LDAP

Import and delete accounts from plain-text files

Importar usuarios

Es posible crear cuentas de usuario desde un archivo TSV (Tab Separated Values, valores separados por tabulación) con el siguiente formato:

username <TAB> fullName <TAB> password <NEWLINE>

Ejemplo:

mario <TAB> Mario Rossi <TAB> 112233 <NEWLINE>

Luego ejecutar:

/usr/share/doc/nethserver-sssd-<ver>/scripts/import_users <youfilename>

Por ejemplo, si el archivo del usuario es /root/users.tsv, ejecute el siguiente comando:

/usr/share/doc/nethserver-sssd-`rpm --query --qf "%{VERSION}" nethserver-sssd`/scripts/import_users /root/users.tsv

Carácter de separador alternativo:

import_users users.tsv ','

Import emails

Es posible crear alias de correo desde un archivo TSV (Tab Separated Values, valores separados por tabulación) con el siguiente formato:

username <TAB> emailaddress <NEWLINE>

A continuación, puede utilizar el script import_emails. Ver Import and delete accounts from plain-text files para una invocación del script de ejemplo.

Import groups

It is possible to create groups from a TSV (Tab Separated Values) file with the following format:

group1 <TAB> user1 <TAB> user2 <NEWLINE>
group2 <TAB> user1 <TAB> user2 <TAB> user3 <NEWLINE>

Ejemplo:

faxmaster <TAB> matteo <TAB> luca <NEWLINE>
managers <TAB> marco <TAB> francesco <TAB> luca <NEWLINE>

Luego ejecutar:

/usr/share/doc/nethserver-sssd-<ver>/scripts/import_groups <youfilename>

For example, if the group file is /root/groups.tsv, execute following command:

/usr/share/doc/nethserver-sssd-`rpm --query --qf "%{VERSION}" nethserver-sssd`/scripts/import_groups /root/groups.tsv

Group management is also available from the command line through group-create and group-modify events

signal-event group-create group1 user1 user2 user3
signal-event group-modify group1 user1 user3 user4

Delete users

It is possible to delete user accounts from a file with the following format:

user1
user2
...
userN

Ejemplo:

mario <NEWLINE>

Luego ejecutar:

/usr/share/doc/nethserver-sssd-<ver>/scripts/delete_users <youfilename>

Truco

You can also use the same import users file to delete the users.

Por ejemplo, si el archivo del usuario es /root/users.tsv, ejecute el siguiente comando:

/usr/share/doc/nethserver-sssd-`rpm --query --qf "%{VERSION}" nethserver-sssd`/scripts/delete_users /root/users.tsv

Carácter de separador alternativo:

delete_users users.tsv ','