Blog Jurišić

To content | To menu | To search

Friday, January 26 2018

Nextcloud upgrade from 12.0.4 to 12.0.5

I update nextcloud server package from 12.0.4 to 12.0.5 for Debian Jessie and Stretch.

Update proces is same as before, check on link.

Changes:

Nextcloud 12.0.5 delivers a lot of changes in various areas including:

Changes

Many fixes were merged, the most important ones include:

  • #7144 Unlock files even if an exception occurs
  • #7322 Set primary action button color to same as theming color
  • #7323 Use the correct root for shared jail when the source storage is also a jail
  • #7353 Fix translation of federation scope menu
  • #7362 Allow to skip data dir permission checks
  • #7407 Check if owner of share exists
  • #7409 Add retry wrapper when reading files from swift
  • #7451 Fix constructor spy in unit test with Sinon 4.1.3
  • #7455 Remove wrong entry in admin_settings that causes 500
  • #7456 CardDAV convertor check should not be to wide
  • #7457 Fix loading icon position in the app menu
  • #7464 Allow getting the filepath when getting cached mounts
  • #7468 Allow 'Nextcloud' in the user agent string of Android
  • #7558 Fix email buttons for white theme
  • #7567 Respect sharing options when searching for Sharees
  • #7568 Fix duplicate session token after remembered login
  • #7577 Check userExists later, saves lookups for appData_INSTANCEID userids
  • #7672 Added additional methods for removal of sensitive info
  • #7688 Fix scss webroot and url rewrite
  • #7717 Throw ServerNotAvailableException when LDAP is caught shutting down
  • #7666 Fix drag shadow not visible when dragging a file on a narrow screen
  • #7674 Do no run SyncJob in cron
  • #7684 Fix inverted app icons on IE11
  • #7694 Don't attempt to translate login names to uids when uids are provided
  • #7708 Don't show recurring msg when pages result was turned off
  • #7742 Hide favourite icon in details view if favourite action is not available
  • #7745 Don't lie about preview types
  • #7747 Update of composer
  • #7758 add option to use legacy v2 auth with s3
  • #7759 Use correct L10N files for jsconfig
  • #7757 Wait for the shared link to be set in the acceptance tests
  • gallery/#349 Fix date picker not visible in slideshow sharing dialog
  • activity/#229 Properly construct path of root on file rename
  • #7770 Fix SCSS processing when undoing theming values
  • #7774 Update icewind/smb to 2.0.3
  • #7777 Set height for sidebar icons
  • #7779 Improve zip support
  • #7786 Return correct mount type for federated shares
  • #7792 Fix empty details view after renaming a file
  • #7817 Fix preview when theming changes invertion of icons
  • #7821 Log full exception in cron instead of only the message
  • #7888 Keep all shipped apps enabled because they should be okay
  • #7962 update icewind/smb to 2.0.4

 

Wednesday, December 6 2017

Nextcloud upgrade from 12.0.3 to 12.0.4

I update nextcloud server package from 12.0.3 to 12.0.4 for Debian Jessie and Stretch.

Update proces is same as before, check on link.

Changes:

Nextcloud 12.0.4 delivers a lot of changes in various areas including:

Over 50 fixes were merged in the server.

Other

 

Wednesday, October 4 2017

Nextcloud upgrade from 12.0.1 to 12.0.3

I update nextcloud server package from 12.0.1 to 12.0.3 for Debian Jessie and Stretch.

Update proces is same as last time, check on link.

Changes:

Nextcloud 12.0.3 delivers a lot of enhancements in various areas including:

  • A number of improvements to email notification templates
  • 2FA enhancements
  • Smarter LDAP password handling
  • File Drop and upload-in-general updates
  • A performance improvement handling large files

See the full list of changes in github.

 

 

Thursday, August 24 2017

Howto install 7 Days To Die dedicade server in 5 min. on Debian

7 Days To Die work very well as Client or Server instance on Linux.  Player can choice single or multiplay on own local PC, and can to play on dedicade servers. Here is example how really fast make dedicade 7dtd server on Debian 9 GNU/Linux.

At the beginning of my trip I wrote my script, but later I found the perfect script from Allocs and me just make Debian package (7dtd-installer). I add package in my Debian repository and if wont to make 7dtd server You can with:

echo "# Jurišić Stretch " >> /etc/apt/sources.list
echo "deb http://apt.jurisic.org/debian/ stretch main contrib non-free" >> /etc/apt/sources.list
wget -q http://apt.jurisic.org/Release.key -O- | apt-key add -
apt-get update
apt-get install 7dtd-installer

That is all, installer will bring Allocs script (bootstrap.sh) and start automatic installation.

More info can read on Allocs wiki page: https://7dtd.illy.bz/wiki

 

Trailer:

Saturday, August 19 2017

Easy FIX performance issues in Warhammer 40,000: Dawn of War III

If your CPU frequency scaling governor is set to "Power Save" mode, you may experience performance issues in Warhammer 40,000: Dawn of War III. When playing games, we recommend that you set your CPU frequency scaling governor to "High Performance" mode.

Easy FIX (run in console as root):

echo performance |  tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor

If wont permanently put CPU frequency scaling governor to "High Performance" mode (eg. after restart PC) simple do:

apt-get install cpufrequtils sysfsutils

Make file /etc/default/cpufrequtils  if not exist, and write:

GOVERNOR="performance"

Add in file /etc/sysfs.conf

mode devices/system/cpu/cpufreq/conservative = 644
devices/system/cpu/cpufreq/conservative/freq_step = 10
devices/system/cpu/cpufreq/conservative/up_threshold = 45
devices/system/cpu/cpufreq/conservative/ignore_nice_load = 1
devices/system/cpu/cpufreq/conservative/sampling_down_factor = 10

After you made the changes , apply them with:

echo performance | tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
systemctl restart sysfsutils

Now check CPU status with:

cpufreq-info

Enojy in game!

 

Thursday, August 10 2017

Nextcloud upgrade from 12.0.0 to 12.0.1

Nextcloud released update 12.0.1.(Aug 7 2017) and if you are using package from my repository (jessie or stretch) You can make very fast upgrade. I will demonstrate how to upgrade from 12.0.0 to 12.0.1. in this short guide.

Check standard changelog before upgrade on link https://nextcloud.com/changelog/ and blog https://nextcloud.com/blog/welcome-to-nextcloud-12. This update brings many improvements and strongly recommend that you install the last update.

Upgrade is very simple (open console as root):

apt-get update
apt-get upgrade 

sudo -u www-data php /var/www/nextcloud/occ upgrade

sudo -u www-data php /var/www/nextcloud/occ app:enable contacts
sudo -u www-data php /var/www/nextcloud/occ app:enable calendar
sudo -u www-data php /var/www/nextcloud/occ app:enable tasks
sudo -u www-data php /var/www/nextcloud/occ app:enable spreed

sudo -u www-data php /var/www/nextcloud/occ maintenance:mode --off

* When Nextcloud going in maintenance mode automatic all app will be tourn off, and in my case I need to enable "contacts,calendar,tasks and spreed", if You using another app enable with "sudo -u www-data php /var/www/nextcloud/occ app:enable app-name".

That is all, enjoy in Nextcloud 12.0.1 !!!

 

 

 

 

 

Thursday, July 20 2017

My Debian 9 Stretch Repository

I make custom Debian 9 Stretch repository. Some programs in official Debian repository is outdate and I don't wont to move from stable to sid (unstable) and solution is making own repository for too old or missing packages.

 

 

 

If wont use this repository simple add in /etc/apt/sources.list, then add keyring:

echo "deb http://apt.jurisic.org/debian/ stretch main contrib non-free" >> /etc/apt/sources.list.d/jurisic.list
wget -q http://apt.jurisic.org/Release.key -O- | apt-key add -

Packages in repository ready for use:

  • oracle java 8 update 201
  • nextcloud server 15.0.10
  • nextcloud client (based on ownCloud 2.3.3)

Simple example if wont to install Oracle Java 8 (atm update 181) just type in console and enjoy:

apt-get install oracle-java8-jre

For more information about packages check https://apt.jurisic.org/

 

Where is Remmina in Debian 9 Stretch?

I'm so happy with new release of Debian 9 Stretch but with fresh installation of Debian, I have "small" problem - can't find package remmina.

At first I couldn't believe, so I checked the news for the new Debian and didn't find anything. On the official web site of Remmina I found confirmation that Remmina has been removed from Strech but will be added to the backports, and the reason is the older version of Remmina 1.1.x. When come Remmina 1.2.x new Remmina will back in backports.

After a month of waiting there is still no package so I decided to make a backport package from Debian Buster (Testing) and add it to my repository https://apt.jurisic.org/ . Feel free to use it and enjoy in the best remote connectivity tool.

 

Example of installation:

echo "deb http://apt.jurisic.org/debian/ stretch main contrib non-free" > /etc/apt/sources.list.d/jurisic.list
wget -q http://apt.jurisic.org/Release.key -O- | apt-key add -
apt-get update
apt-get install remmina

 

 

Monday, June 19 2017

Debian 9 Stretch released

After 2 years and 2 month, Debian released Stretch under Stable edition and this is Dedicated to Ian Murdock. The new operating system will be officially supported for 5 years and bring lots update packages (Linux kernel 4.9, GNOME 3.22, KDE 5.8, MATE 1.16 Xfce 4.12, LibreOffice 5.2, GCC 6.3, Python 3.5 and PHP 7). Iceewasel and Icedove now have orginal names Firefox and Thunderbird.



More on official link Debian News.

Wednesday, June 7 2017

Nextcloud client upgrade from 2.2.4 to 2.3.1

Today I update my repository with package nextcloud-client from 2.2.4 version to 2.3.1, more about changes check on https://owncloud.org/changelog/desktop/.

Proces of upgrade is very simple:

apt-get update
apt-get upgrade

Enjoy in new version of client.

Source code : https://github.com/nextcloud/client_theming

Friday, May 26 2017

Nextcloud upgrade from 11.0.3 to 12.0.0

Nextcloud released 12.0.0.(May 22 2017) and if you are using package from "Jurisic repository". I will demonstrate how to upgrade from 11.0.3 to 12.0.0. in this short guide.

Check standard changelog before upgrade on link https://nextcloud.com/changelog/ and blog https://nextcloud.com/blog/welcome-to-nextcloud-1.

Upgrade is very simple (open console as root):

apt-get update
apt-get upgrade 

sudo -u www-data php /var/www/nextcloud/occ upgrade
sudo -u www-data php /var/www/nextcloud/occ maintenance:mode --off

sudo -u www-data php /var/www/nextcloud/occ app:enable contacts
sudo -u www-data php /var/www/nextcloud/occ app:enable calendar
sudo -u www-data php /var/www/nextcloud/occ app:enable tasks
sudo -u www-data php /var/www/nextcloud/occ app:enable spreed

* When Nextcloud going in maintenance mode automatic all app will be tourn off, and in my case I need to enable "contacts,calendar,tasks and spreed", if You using another app enable with "sudo -u www-data php /var/www/nextcloud/occ app:enable app-name".

That is all, enjoy in Nextcloud 12.0.0 !!!

 

 

 


 

 

Thursday, May 25 2017

Update Notifier Applet

I very long time seek program for update notification witch don't need tons of packages depends for my desktop Environment (MATE Desktop). Answer is UN-Applet (Update Notifier Applet), program need minimal set of packages, work perfect and I have finnaly notification about new packages.

Example of icon in my panel:

Example of config:

Instalation of UN-Applet is very easy, author of program Michael Lange is write complete instructions for install program and I suggest to check homepage http://unapplet.tuxfamily.org/.

 

 

Oracle Java 8 Update 131

Today I update packages oracle-java8-jre and oracle-java8-jdk update from 121 to 131.

 

 

 

More about at source 8u131 Update Release Notes, if wont to use this packages check "My Repository".

 

Monday, April 24 2017

Nextcloud upgrade to 11.0.3

Last stable version of Nextcloud server is 11.0.3 , this version brings lots improvements. If using my Debian Repository I update packages and all is ready for upgrade on last stable version(example how to upgrade).

Enjoy in great Nextcloud !!!

 

Screenshot after upgrade:

 

Changelogs (Source: https://nextcloud.com/changelog/):

Server
  • Use the correct principal for shared addressbooks (server/3608)
  • Fix saving backup codes by using a correct data uri (server/3652)
  • Update icewind/streams to 0.5.2 (server/32931)
  • Fix string comparison and return docs (server/3665)
  • Typecast shared mount's storage_id to int as documented + some refactor to avoid similar bugs (server/3658)
  • Use a proper date format for transfer ownership (server/3700)
  • DAV sharing permissions should not depend on the order (server/3722)
  • Add new user agent of windows 10 dav backend (server/37641)
  • Add back appstoreenabled config switch (server/37671)
  • Call right function after sudo mode (server/3820)
  • Dont allow empty wildcard search (server/3842)
  • Remove single quotes around search query like in user search (server/3849)
  • Fix mimetype detection on public uploads for the workflow engine (server/3765)
  • Fix branding and show Nextcloud (server/39691)
  • Fix reshare with user activity message (server/39812)
  • Create correct VCard and return correct error codes (server/4029)
  • Prevent migration from ownCloud 10 to Nextcloud 11 (server/34151)
  • Make sure transparency is an integer when saving a calendar (server/4167)
  • Make public links work with master key (server/42071)
  • Don't try to render the avatars if avatars are disabled (server/4214)
  • Reduce error message text (server/42281)
  • Don't list on public calendar endpoints (server/4229)
  • Fix upload of folders in Chrome (server/4154)
  • Make sure blob columns are correctly converted as parameters (server/4233)
  • Save the scope of an auth token in the session (server/4225)
  • Take share by mail into consideration if we calculate the access list (server/4242)
  • Also add the root of external storages to the file id list (server/4237)
  • Fix LDAP description (server/42382)
  • Remove the double password confirmation on changing cron (server/4236)
  • Fix scheduling plugin on legacy caldav endpoint (server/4235)
  • Directly fix invalid values of DTEND and DTSTART (server/4234)
  • Make JobList::next() lock free (server/4254)
  • Don't remove owner property for public calendars (server/4272)
  • Add capabilities for share by mail (server/42511)
  • Dont use the permissions mask while scanning (server/4278)
  • Add missing maintenance plugin to new DAV endpoint (server/4290)
  • Fix bug with shared_by for own calendars if shared (server/4301)
  • Translation string corrected > 1 user (server/4377)
Activity
  • Fix activities for "Files drop" on external storages (activity/118)
User_SAML
Logreader
Gallery

 

Friday, March 31 2017

How to install Openfire server on Debian 8 Jessie

Openfire is a real time collaboration (RTC) server licensed under the Open Source Apache License. It uses the only widely adopted open protocol for instant messaging, XMPP (also called Jabber). Openfire is incredibly easy to setup and administer, but offers rock-solid security and performance.

If you looking for an alternative to public IM and VOIP services Openfire is great solution.

 

Settings about host before installation

Before installation of Openfire, I set settings as in my example:

  • System name: openfire.test.com 
  • Domain name: test.com
  • System IP: 192.168.22.202

LDAP settings (if don't have LDAP server check How to Install and configure a Basic LDAP Server on an Debian 8 Jessie):

  • Base DN: dc=test,dc=com
  • Bind user: cn=nextcloud,ou=groups,dc=test,dc=com
  • Server IP: 192.168.22.202

 

Install Java

Openfire need Java for running, I personal using Java 8 from my repository , first install java:

apt-get install oracle-java8-jre

 

Download and install Openfire package

First need to download Debian package, and install package

wget --no-check-certificate https://github.com/igniterealtime/Openfire/releases/download/v4.1.3/openfire_4.1.3_all.deb
dpkg -i openfire_4.1.3_all.deb

 

Setup for Openfire

Now open web browser to start setup of Openfire ( http://192.168.22.202:9090 - replace IP with Your address of host )

Select language and press "Continue"

Input network settings:

  • XMPP Domain Name: test.com
  • Server Host Name (FQDN): openfire.test.com
  • Admin Console Port:9090
  • Secure Admin Console Port: 9091

If wish can set "Property Encryption Key" for Encryption password in configuration files of Openfire, in this example I don't use that. Admin Console Port using 9090 and Secure Admin Console Port 9091 but in some case good idea to change this ports in non-standard.

Next click on "Continue"

If don't have lots of users select "Embedded Database" and click on "Continue"

Select "Directory Server (LDAP) and click on "Continue"

Connection Settings:

  • Server Type: OpenLDAP
  • Host: 192.168.22.202
  • Port: 389
  • Base DN: dc=test,dc=com
  • Administration DN: cn=admin,dc=test,dc=com
  • Password: <Your password>

Click on "Test Settings" and if all ok, You will see message "Status: Success!"

Close message and click on "Save & Continue"

Click on "Save & Continue"

 

I my example I don't wont to mapping all group from LDAP. My choice is only group "cn=nextcloud,ou=groups,dc=test,dc=com".

Group Mapping:

  • Group Field: cn
  • Member Field: memberUid
  • Description Field: description
  • Posix Mode: Yes
  • Group Filter: (&(|(objectclass=posixGroup))(|(cn=nextcloud)))

Click on "Save & Continue"

Now choose one or more users from your LDAP to be adminstratos, in my case I select user1 and press "Add", then click on "Continue"

Now Your Openfire server is ready for using.

Recommendation read : http://www.igniterealtime.org/projects/openfire/documentation.jsp

Desktop clients :

Android clients:

 

 

Saturday, March 25 2017

MATE Desktop 1.18 released

The MATE Desktop Environment is the continuation of GNOME 2. It provides an intuitive and attractive desktop environment using traditional metaphors for Linux and other Unix-like operating systems.

 

What’s new in MATE 1.18

The release is focused on completing the migration to GTK3+ and adopting new technologies to replace some of deprecated components MATE Desktop 1.16 still relied on.

The headline changes in MATE Desktop 1.18 are:

  • The entire MATE Desktop suite of applications and components is now GTK3+ only!
    • Requires GTK+ >= 3.14.
    • All GTK2+ code has been dropped including the --with-gtk build option.
  • Completed the migration to GtkApplication from libunique.
  • Added libinput support for mouse and touchpad.
    • Separate settings for handedness (left/right-handed) and motion acceleration/threshold.
  • Much improved accessibility support (particularly for visually impaired users).
    • Many thanks to our friends at Hypra.fr for their contribution!
  • Caja adds several new features including:
    • Added a copy queue and copy pausing.
    • Asking confirmation before moving files to the Trash.
    • Support for back/forward mouse buttons for directory navigation.
    • Notification when ejected drives are safe to unplug.
  • Lock screen will load the users selected background instead of the system defined default.
  • MATE Panel gets several improvements, including:
    • Added desktop actions support for additional launch options.
    • Added StatusNotifier support.
    • Added support for Menulibre menu editor, if installed it is preferred over Mozo.
  • Engrampa, the archive manager, includes a number of improvements:
    • Added ear and war to the supported types list.
    • Check the rar/unrar version to the correct date is shown.
    • Fixed compress rar and 7z split into volumes.
  • Notifications now implement action icons support, for example playback control icons used by media players.
  • Reworked the font viewer to add font browsing mode, support for TTC fonts and expose it in the menus by default.
  • Replaced deprecated upower suspend/hibernate functions with ConsoleKit2 equivalents.
  • MATE Terminal adds the ability to close tabs with middle mouse button.
  • Atril, the document viewer, has much improved page load times and adds support for unarchiver used by some comics.
  • Lots of deprecated GTK+ methods have been replaced and many bugs have been fixed.
  • The plugin systems, and all C and Python plugins, in Eye of MATE and Pluma have been ported to libpeas.
  • Translations are updated. Thank you to our team of translators!
  • A number of memory leaks have been plugged.
  • A-n-d most exciting of all… MATE Calculator is back and has been ported to GTK3+ :-D

The various components of MATE Desktop 1.18 are available for download here:

 

 

 

 

 

 

 

 

Wednesday, March 1 2017

Nextcloud upgrade to 11.0.2

Nextcloud released update 11.0.2.(February 27 2017) and if you are using package from "Jurisic repository". I will demonstrate how to upgrade from 11.0.1 to 11.0.2. in this short guide.

Check changelog before upgrade on link https://nextcloud.com/changelog/

As you can see i got message and notification on my server (Update to Nextcloud 11.0.2 is available)  which tells me that now is time for upgrade.

 

Upgrade Nextcloud 

First we need to update with apt-get:

apt-get -y update
apt-get upgrade

Choose "Y" to start the installation, wait fo finish the download and package will set Nextcloud server in Maintenance mode.

Now start upgrade Nextcloud server with OCC tools:

sudo -u www-data /var/www/nextcloud/occ upgrade

After upgrade turn off Maintenance mode and enable apps:

sudo -u www-data /var/www/nextcloud/occ maintenance:mode --off

Check which app is disabled after upgrade and enable (in my case only contacts):

sudo -u www-data /var/www/nextcloud/occ app:enable contacts

Nextcloud server is ready for use. Enjoy !

 

 

 

Tuesday, February 28 2017

How to install PostgreSQL 9.6 server on Debian 8 Jessie

PostgreSQL is a fully featured object-relational database management system. It supports a large part of the SQL standard and is designed to be extensible by users in many aspects. Some of the features are: ACID transactions, foreign keys, views, sequences, subqueries, triggers, user-defined types and functions, outer joins, multiversion concurrency control. Graphical user interfaces and bindings for many programming languages are available as well.

It has more than 15 years of active development and a proven architecture that has earned it a strong reputation for reliability, data integrity, and correctness.

 

If wont to use PostgreSQL 9.6 need to add repository (Debian current have PostgreSQL 9.4 in repository).

Add PostgreSQL Repository

Add the PostgreSQL repository in the /etc/apt/sources.d/postgresql.list

echo 'deb http://apt.postgresql.org/pub/repos/apt/ jessie-pgdg main' >> /etc/apt/sources.list.d/postgresql.list

Install release key of PostgreSQL repository:

wget --no-check-certificate -q https://www.postgresql.org/media/keys/ACCC4CF8.asc -O- | apt-key add -

And run apt-get update to download the list of packages.

apt-get update

 

Install PostgreSQL and setup new user & database

Install PostgreSQL with:

apt-get install postgresql-9.6

The PostgreSQL package will install all required dependencies.

Choose "Y" to start the installation, wait fo finnish and PostgreSQL is ready for using.

 

Create a PostgreSQL database, user and set permissions

The next step is to create a PostgreSQL database, add user and set permissions.

Login to PostgreSQL on the commandline by running this command:

su - postgres
psql

Enter the following commands to create a database: 

CREATE DATABASE mybase;
CREATE USER myuser WITH PASSWORD 'StorngPasswordHere';
GRANT ALL PRIVILEGES ON DATABASE mybase to myuser;

We have created a PostgreSQL database above, enter the details of that database now:

  • Username:            myuser
  • Password:            StorngPasswordHere
  • Database name: mybase

Change username,password and database to Your needs.

 

Test new PostgreSQL database

Now run simple test:

psql -h localhost -U myuser -W -d mybase

If You success connect - bingo !!!!  Enjoy in PostgreSQL 

 

 

Tuesday, February 21 2017

How to configure Nextcloud server with LDAP

Nextcloud have excelent Apps for integration user and group by LDAP / AD. If don't have LDAP server check "How to Install and configure a Basic LDAP Server on an Debian 8 Jessie" and continue reading this short example of integration LDAP and Nextcloud.

 

Activate LDAP user and group backend for Nextcloud

Login in Nextcloud as Administrator and click on top left dropdown list and select "Apps", then click on "Not enabled" and search " LDAP user and group backend".

Click on button "Enable" and wait 5-10 sec, then click on top right dropdown list.

Click on "Admin", and select "LDAP / AD integration"

Enter LDAP connection data and go in section Users.

Hostname:            localhost
LDAP bind user:  cn=admin,dc=test,dc=com
Password:            The password that you have choosen.
Base DN:              dc=test,dc=com

Under selection "Only these object class" select "inetOrgPerson". Now go in section Login Attributes.

Select checkbox "LDAP / AD Username" and "LDAP / AD Email Address" (users can login with username or e-mail), then go in section Groups.

Under selection "Only these object class" select "posixGroup" and under "Only from these groups" select "nextcloud" then go in Advanced settings.

Under Advanced set Special Attributes. 

Email Field:             mail
User Home Folder: uid

Now can check users, click on top-right dropdown list and select "Users"

 

LDAP Expert

Under Username system generate UUID attribute automatically and that value need to be unique. You can change Internal Username from UUID to uid but that option is open only for expert users.

You can change "Internal Username" for example in "uid", and result is:

That is all, enjoy in Nextcloud with LDAP integration.

 

 

 

 

Friday, February 17 2017

How to Install and configure a Basic LDAP Server on an Debian 8 Jessie

Lightweight Directory Access Protocol (LDAP), is a protocol for managing related information from a centralized location through the use of a file and directory hierarchy.

It functions in a similar way to a relational database in certain ways, and can be used to organize and store any kind of information. LDAP is commonly used for centralized authentication.

 

Settings about host before installation

Before installation of LDAP, I set settings as in my example:

  • System name: ldap.test.com 
  • Domain name: test.com
  • System IP: 192.168.22.200

Configuration files:

cat /etc/hostname

ldap

cat /etc/hosts

127.0.0.1      localhost
127.0.1.1      ldap.test.com ldap

cat /etc/network/interfaces

source /etc/network/interfaces.d/*

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
address 192.168.22.200
netmask 255.255.255.0
gateway 192.168.22.1

 

Install LDAP server and utils packages

Install packages with:

apt-get install slapd ldap-utils

Choose "Y" to start the installation.

Enter strong password and press enter, then confirm password,

Set BASE and URI in config file /etc/ldap/ldap.conf

BASE    dc=test,dc=com
URI     ldap://localhost:389

Now configure slapd package with:

dpkg-reconfigure slapd

Choose "No" and press enter

Just press enter

Enter organization name, or leave default

Enter strong password and press enter, then confirm password

Select database backend, in my case MDB

Select "No"

Select "Yes"

Select "No", and Your LDAP is complete configured.

 

Start LDAP service

Start LDAP service with:

systemctl restart slapd

Check LDAP with:

ldapsearch -x 

 

Very basic LDAP tree

Now we can create groups, users in LDAP

 

Create groups

make file: nano groups.ldif

version: 1

dn: ou=groups,dc=test,dc=com
objectClass: top
objectClass: organizationalUnit
ou: groups

dn: cn=nextcloud,ou=groups,dc=test,dc=com
objectClass: top
objectClass: posixGroup
cn: nextcloud
gidNumber: 500
memberUid: user1
memberUid: user2

Now add groups (groups and nextcloud):

ldapadd -x -W -D "cn=admin,dc=test,dc=com" -f groups.ldif

make file: nano users.ldif

version: 1

dn: ou=users,dc=test,dc=com
objectClass: top
objectClass: organizationalUnit
ou: users

dn: cn=First User,ou=users,dc=test,dc=com
objectClass: top
objectClass: posixAccount
objectClass: inetOrgPerson
cn: First User
gidNumber: 500
homeDirectory: /home/user1
sn: User
uid: user1
uidNumber: 2000
givenName: First
loginShell: /bin/bash
mail: user1@test.com
userPassword: {CRYPT}$1$58hxEKLS$ypZarETITIXH4WMotxS2k/

dn: cn=Second User,ou=users,dc=test,dc=com
objectClass: top
objectClass: posixAccount
objectClass: inetOrgPerson
cn: Second User
gidNumber: 500
homeDirectory: /home/user2
sn: User
uid: user2
uidNumber: 2001
givenName: Second
loginShell: /bin/bash
mail: user2@test.com
userPassword: {CRYPT}$1$a1ade9eu$zEAzuj1nO5FU4Hx.BE3cq1

Now add users (user1 and user2, password is crypted ad value is test123):

ldapadd -x -W -D "cn=admin,dc=test,dc=com" -f users.ldif

 

Test LDAP 

Simple test of LDAP service:

Search all users in ou=users,dc=test,dc=com :

ldapsearch -x -W -D cn=admin,dc=test,dc=com -b "ou=users,dc=test,dc=com" inetOrgPerson

 

- page 2 of 3 -