Users and groups

Account providers

NethServer supports authentication and authorization against either a local or remote account provider.

Supported provider types are:

  • Local OpenLDAP running on NethServer itself
  • Remote LDAP server with RFC2307 schema
  • Local Samba 4 Active Directory Domain Controller
  • Remote Active Directory (both Microsoft and Samba)

The root user can configure any type of accounts provider from the Accounts provider page.

Be aware of the following rule about account providers:

Once NethServer has been bound to an account provider the FQDN cannot be changed any more
Remote providers
After NethServer has been bound to a remote account provider the User and groups page shows the domain accounts in read-only mode.
Local providers
After installing a local provider (either Samba 4 or OpenLDAP), the administrator can create, modify and delete the users and groups.


Please choose wisely your account provider because the choice could not be reversible. Also the system will forbid any change to the FQDN after the account provider has been configured.

Choosing the right account provider

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 module of NethServer, which enables the 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 Shared folders.

On the other hand, the local OpenLDAP provider is more easy to install and configure.

In the end, if the SMB file sharing protocol support is not required, an LDAP provider is the best choice.

OpenLDAP local provider installation

To install and configure an OpenLDAP local accounts provider, go to page Accounts provider > LDAP > Install locally. The system needs a working internet connection to download additional packages.

At the end of the installation the package is automatically configured and the administrator will be able to manage users and groups from the User and groups page.

See Admin account section for more details about default administrative user and group.


The NethServer OpenLDAP account provider does not fully support the user password expiration. Refer to Effects of expired passwords for more information

Samba Active Directory local provider installation

When installing Samba Active Directory as local account provider, the system needs an additional IP address and a working internet connection.

The additional IP is assigned to a Linux Container that runs the Active Directory Domain Controller roles and must be accessible from the LAN (green network).

Therefore the additional IP address must satisfy three conditions:

  1. the IP address has to be free; it must not be used by any other machine
  2. the IP address has to be in the same subnet range of a green network
  3. the green network has to be bound to a bridge interface where the Linux Container can attach its virtual interface; the installation procedure can create the bridge interface automatically, if it is missing

To install a local Active Directory accounts provider, go to page Accounts provider > Active Directory > Create a new domain.

The DNS 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 Domain Controller IP address field must be filled with the additional IP address explained above.

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


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

The Active Directory configuration procedure might require some time to run. It creates the Linux Container chroot, by downloading additional packages.

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 Active Directory configuration procedure, the NethServer host machine is automatically configured to join the Active Directory domain. Go to the page User and groups to see the default accounts.

The previously assigned IP address can be changed from Accounts provider > Change IP.


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 and 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 Admin account 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.


  • public (external) domain:
  • server FQDN:
  • Active Directory (internal LAN only) domain:
  • domain controller FQDN (assigned by default):


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


Installing on a virtual machine

Samba Active Directory runs inside a Linux Container which uses a virtual network interface bridged to the network interface of the system. The virtual network interface has to be visible inside the physical network, but often virtualization solutions block ARP traffic. As a result, the Samba Active Directory container is not visible from LAN hosts.

When installing on virtual environment, make sure the virtualization solution allows traffic in promiscuous mode.


To setup the promiscuous mode policy, select “Allow all” from the drop down list located in the network settings section.


Enter the networking configuration section of the virtualization mode and set the virtual switch in promiscuous mode.


Make sure the virtual machine is bridged to a real bridge (like br0) and the bridge is put in promiscuous mode.

It is possible to force a bridge (i.e. br0) in promiscuous mode using this command:

ifconfig br0 promisc

Configure MAC Address Spoofing for Virtual Network Adapters [2]


Local accounts provider uninstall

Both LDAP and AD local accounts provider can be uninstalled from the Accounts provider > Uninstall page.

When the local accounts provider DB is uninstalled, any user, group and computer account is erased.

  • A list of users and groups in TSV 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.

  • Existing files owned by users and groups must be removed manually. This is the list of system directories containing users and groups data:


Join an existing Active Directory domain

Here NethServer is bound to a remote Active Directory account provider. It can be provided by either Samba or Microsoft implementations. In this scenario NethServer becomes a trusted server of an existing Active Directory domain. When accessing a NethServer resource from a domain workstation, user credentials are checked against one of the domain controllers, and the access to the resource is granted.

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

The Kerberos protocol requires the difference between systems clocks in the network is less than 5 minutes. Configure the network clients to align their clocks to a common time source. For NethServer go to Date and time page.

After the prerequisite is fulfilled, proceed to the page Accounts provider > Active Directory > Join a domain.

  • Enter the DNS domain name of the AD domain. The NetBIOS domain name (domain short name) is probed automatically.
  • Fill the AD DNS server field. Usually it is the IP address of an AD domain controller.
  • Provide the User name 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!


Some additional modules, like Nextcloud, WebTop, Roundcube, Ejabberd require read-only access to AD LDAP services. To be fully operational they require an additional account to perform simple LDAP binds.

Create a dedicated user account in AD, and set a complex non-expiring password for it.

Once NethServer has successfully joined AD, specify the dedicated user account credentials in Accounts provider > Authentication credentials for LDAP applications.

Bind to a remote LDAP server

To configure a remote LDAP accounts provider, go to page Accounts provider > LDAP > Bind remotely.

Type the LDAP server IP address in the field Host name or IP. If the LDAP service runs on a non-standard TCP port, specify it in TCP port.

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 Save button to confirm.

If the LDAP server requires authentication, fill in the fields under Authenticated bind. Enable either ldaps:// or STARTTLS to encrypt the connection.


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


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

When creating a user, following fields are mandatory:

  • User name
  • Full name (name and surname)

A user can be added to one or more group from the Users page or from the Groups one.

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

  • lock the user using the Lock action
  • (optionally) change the user’s password with a random one


When a user is deleted, the home directory and personal mail box will be also deleted.

Changing the password

If there wasn’t given an initial password during user creation, the user account is disabled. To enable it, set a password using the Change password button.

When a user is enabled, the user can access the Server Manager and change his/her own password by going to the label on the upper right corner of the screen and clicking on Profile.

If the system is bound to an Active Directory account provider, users can change their password also using the Windows tools. In this case you can not set passwords shorter than 6 characters regardless of the server policies. Windows performs preliminary checks and sends the password to the server where it is evaluated according to the configured policies.

Credentials for services

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

The user name can be issued in two forms: long (default) and short. The long form is always accepted by services. It depends on the service to accept also the short form.

For instance if the domain is and the user is goofy:

User long name form
User short name form

To access a shared folder, see also Network access.

User home directories

User home directories are stored inside /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


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

Two special groups can be created. Members of these groups are granted access to the panels of the Server Manager:

  • domain admins: members of this group have the same permissions as the root user from the Server Manager.
  • managers: members of this group are granted access to the Management section of the Server Manager.

Admin account

If a local AD or LDAP provider is installed, an admin user, member of the domain admins group is created automatically. This account allows access to all configuration pages within the Server Manager. It is initially disabled and has no access from the console.


To enable the admin account set a password. Also remember to enable the shell if the admin user must access the new Server Manager.

Where applicable, the admin account is granted special privileges on some specific services, such as joining a workstation to an Active Directory domain.

If NethServer is bound to a remote account provider, the admin user and domain admins group could be created manually, if they do not already exist.

If a user or group with a similar purpose is already present in the remote account provider database, but it is named differently, NethServer can be configured to rely on it with the following commands:

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

Password management

The system provides the ability to set constraints on password complexity and expiration.

Password policies can be changed from web interface.


The password complexity is a set of minimum conditions for password to be accepted by the system: You can choose between two different management policies about password complexity:

  • none: there is no specific control over the password entered, but minimum length is 7 characters
  • strong

The strong policy requires that the password must comply with the following rules:

  • Minimum length of 7 characters
  • Contain at least 1 number
  • Contain at least 1 uppercase character
  • Contain at least 1 lowercase character
  • Contain at least 1 special character
  • At least 5 different characters
  • Must be not present in the dictionaries of common words
  • Must be different from the username
  • Can not have repetitions of patterns formed by 3 or more characters (for example the password As1.$ AS1. $ is invalid)
  • If Samba Active Directory is installed, also the system will enable password history

The default policy is strong.


Changing the default policies is highly discouraged. The use of weak passwords often lead to compromised servers by external attackers.


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 Password expiration for users 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 Password expiration for users is enabled

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

Effects of expired passwords


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

Import users

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

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


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

then execute:

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

For example, if the user’s file is /root/users.tsv, execute following command:

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

Alternative separator character:

import_users users.tsv ','

Import emails

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

username <TAB> emailaddress <NEWLINE>

Then you can use the import_emails script. See Import and delete accounts from plain-text files for a sample script invocation.

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>


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

then execute:

/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:



mario <NEWLINE>

then execute:

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


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

For example, if the user’s file is /root/users.tsv, execute following command:

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

Alternative separator character:

delete_users users.tsv ','