WebTop4 and Samba4 AD on NS 7

Hi,

there is a postgres function we have created for Nethesis to allow automatic deletion of a single user when that user is deleted from the entire system (ldap etc).
This function is written in plpgsql.
For this reason, the webtop initialization script of NethServer has sql code to ensure that this language is installed (via a “create language plpgsql”).
I bet there are times where postgres is already in use on the system and have plpgsql already installed, causing the error on that sql statement.

Is this the case?

Gabriele

3 Likes

Hi Gabriele,

Thank you for your response.

First, I don’t know what do you mean when you refer to “language”. Is about “programmer language” or about “language” as English, Italian, …
If is the last case, I always use English (US).

The PGSQL was installed by WebTop.
The installation of the WebTop was like I have described above.

Usually, when I have installed WebTop I had only one user created: Samba AD Administrator.

I will reinstall NS and WebTop from scratch, by this procedure:

  • Install NS 7b2 from scratch (bare-metal server).
  • Make all updates.
  • Edit the “Organizations contacts”.
  • Edit the “Self-signed certificate”.
  • Install the “Account provider: Samba Active Directory” package, from Software center.
  • Install the “fix” for Samba AD by @davidep
  • Configure Samba AD
  • admin-todo reminder on Dashboard for Administrator’s password: Change password for user administrator@test.abt.ro (first time, from “Nethesis,1234”)
  • Install Email (Email server and filter)
  • Install POP3 proxy (Intercept POP3 connections and scan messages for virtus and spam)
  • Install SMTP proxy (SMTP proxy)
  • Install Basic firewall (Configure network adapters and basic firewall) - automatically installed
  • Install WebTop groupware (WebTop groupware)

One question please (also for @davidep and @giacomo)

The FQDN of the server will be “pdc-ad.test.abt.ro”.
As I said, I intend to test this configuration as AiO Server.
The registrations for mail server (MX, …) are kept on an External Name Server.
I think that I must to create an alias: Configuration -> DNS -> Server alias -> Create New: mail.test.abt.ro. Is this correct?
If YES, when I must create this alias: before install WebTop, or after? (By me, doesn’t matter, but …)

TIA,
Gabriel

2 Likes

It is the language used by the postgres store procedures.
It looks like some of install steps preceding Webtop, is already creating the plpgsql, and this is not a considered case by the NethServer Webtop install script.
Maybe @giacomo can find some way to run all the webtop install script without the “create language”, and create that in a separate script that is not blocking when failing?

Gabriele

1 Like

You don’t need it (@davidep please correct me if I’m wrong).

I suppose the issue is in this line: https://github.com/NethServer/nethserver-webtop4/blob/f97de3c4dfb7268b3ec083320052aa8e655c55f2/root/usr/share/webtop/webtop.sql#L2819

Am I correct?
Can we replace it with the following?

CREATE OR REPLACE plpgsql;

From: https://www.postgresql.org/docs/9.0/static/sql-createlanguage.html

I’m ok also with removing the entire line, but I have no idea about the effects.

4 Likes

Yes, I think this is the solution, just check that you have version 9 of Postgres.
In any case, just check it works on a bare machine where you didn’t install webtop yet.

1 Like

Thanks for your help man, your contributions here are huge! :grin:
You definitely deserve the Tireless Beta Tester Badge every day

2 Likes

Hi @giacomo ,

Do you think I should wait you to try to find a solution for this situation (maybe it could happen again in the future), or can I reinstall NS from scratch to continuing the tests?

Maybe I could avoid to reinstall NS and I could remove WebTop “in all” (webTop and all dependencies) so after that to reinstall it from Software center?

Can you tell me how to do that?
If I remove WebTop from Software center, will remove only WebTop without removing PGSQL, Tomcat, …

TIA,
Gabriel

I just created a pull request (and the rpm in testing) which should fix the problem:

You can remove webtop4 with the following commands:

systemctl stop tomcat
su - postgres  -c "psql -c 'drop database webtop'"
rpm -e nethserver-webtop4
2 Likes

It works!

Thank you!
Now, I can continue the tests!

2 Likes

I just released the update, it will be available since tomorrow :slight_smile:

2 Likes

Indeed, I don’t need it!

EDIT: Some simple send/receive tests, from WAN (outside), with WebTop:

  • From WebTop web client: send/receive emails without issues
  • Outlook 2013: IMAP/POP3 account: send/receive emails without issues

Errors in /var/log/maillog (the users exist and I can send/receive emails from these accounts):


Sep 14 23:25:37 pdc-ad postfix/lmtp[10695]: 2C88F41E72EC: to=test@test.abt.ro, relay=pdc-ad.test.abt.ro[/var/run/dovecot/lmtp], delay=0.32, delays=0.05/0.02/0.06/0.19, dsn=2.0.0, status=sent (250 2.0.0 test@test.abt.ro 1787EUGy2VfIKQAAIdkCLg Saved)
Sep 14 23:25:37 pdc-ad dovecot: lmtp(10696): Disconnect from local: Successful quit
Sep 14 23:25:37 pdc-ad postfix/qmgr[5790]: 2C88F41E72EC: removed
Sep 14 23:25:48 pdc-ad dovecot: auth: Error: userdb(test,127.0.0.1,<EE6eiH089gB/AAAB>): user not found from any userdbs
Sep 14 23:25:48 pdc-ad dovecot: auth: Error: userdb(administrator,127.0.0.1,<W67biH08+AB/AAAB>): user not found from any userdbs
Sep 14 23:27:54 pdc-ad dovecot: auth: Error: userdb(test,127.0.0.1,<JPMikH08DAB/AAAB>): user not found from any userdbs
Sep 14 23:27:54 pdc-ad dovecot: auth: Error: userdb(administrator,127.0.0.1,<tbxgkH08EAB/AAAB>): user not found from any userdbs
Sep 14 23:28:57 pdc-ad postfix/anvil[10683]: statistics: max connection rate 1/60s for (smtp:209.85.214.48) at Sep 14 23:25:34
Sep 14 23:28:57 pdc-ad postfix/anvil[10683]: statistics: max connection count 1 for (smtp:209.85.214.48) at Sep 14 23:25:34
Sep 14 23:28:57 pdc-ad postfix/anvil[10683]: statistics: max cache size 1 at Sep 14 23:25:34
Sep 14 23:30:00 pdc-ad dovecot: auth: Error: userdb(test,127.0.0.1,<i5Oil308JAB/AAAB>): user not found from any userdbs
Sep 14 23:30:00 pdc-ad dovecot: auth: Error: userdb(administrator,127.0.0.1,<E3ngl308JgB/AAAB>): user not found from any userdbs
Sep 14 23:32:06 pdc-ad dovecot: auth: Error: userdb(test,127.0.0.1,<zbUnn308OgB/AAAB>): user not found from any userdbs
Sep 14 23:32:06 pdc-ad dovecot: auth: Error: userdb(administrator,127.0.0.1,<ynxln308PAB/AAAB>): user not found from any userdbs
Sep 14 23:34:12 pdc-ad dovecot: auth: Error: userdb(test,127.0.0.1,<xLOspn08UAB/AAAB>): user not found from any userdbs
Sep 14 23:34:12 pdc-ad dovecot: auth: Error: userdb(administrator,127.0.0.1,<mXrqpn08UgB/AAAB>): user not found from any userdbs
Sep 14 23:35:35 pdc-ad clamd[1087]: SelfCheck: Database status OK.
Sep 14 23:36:18 pdc-ad dovecot: auth: Error: userdb(test,127.0.0.1,<9hEqrn08ZgB/AAAB>): user not found from any userdbs
Sep 14 23:36:18 pdc-ad dovecot: auth: Error: userdb(administrator,127.0.0.1,<P9pnrn08aAB/AAAB>): user not found from any userdbs

cc: @gabriele_bulfon

In
WebTop Admin -> Domains -> NethServer -> Users
I can see the users that I have created in NS Samba AD Users and groups
but in
WebTop Admin -> Domains -> NethServer -> Groups
I cannot see the groups that I have created in NS Samba AD Users and groups.

It’s normal?

In WebTop web client, when I compose a new mail, is possible to see in To: drop down list the domain user accounts, automatically, not only the email accounts for already sended emails?

TIA,
Gabriel

1 Like

Webtop groups are not domain groups, at the moment.
They’re just an internal group management to allow for faster assign of shares and so on.

Also, the recipient suggestion will lookup personal and shared contacts, and autoamtically learned contacts.
The users database is not looked up at the moment.
This will surely be available in WT5, but we’re also considering an update to WT4.5

Gabriele

2 Likes

Thank you Gabriele!

I look forward for WebTop5!

Kind regards,
Gabriel

1 Like

@gabriele_bulfon I have the same error on my VM here. It seems like a background process tries to authenticate every 2 minutes, but the username is wrong because it is missing the @domain suffix.

On the other hand, if I authenticate on webtop I can read the mailbox without any problem.

1 Like

Is it always the administrator?

No on my machine I have a “davidep” account, similar lines, please note also the managesieve access is correct.

Sep 15 11:39:50 vm5 dovecot: managesieve-login: Login: user=, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=6152, secured, session=
Sep 15 11:39:50 vm5 dovecot: managesieve(davidep@dpnet.nethesis.it): Disconnected: Logged out bytes=18/98
Sep 15 11:40:05 vm5 dovecot: auth: Error: userdb(davidep,127.0.0.1,): user not found from any userdbs
Sep 15 11:42:11 vm5 dovecot: auth: Error: userdb(davidep,127.0.0.1,<4G21qIg8OgB/AAAB>): user not found from any userdbs
Sep 15 11:44:17 vm5 dovecot: auth: Error: userdb(davidep,127.0.0.1,): user not found from any userdbs
Sep 15 11:46:23 vm5 dovecot: auth: Error: userdb(davidep,127.0.0.1,): user not found from any userdbs
Sep 15 11:48:29 vm5 dovecot: auth: Error: userdb(davidep,127.0.0.1,): user not found from any userdbs
Sep 15 11:50:35 vm5 dovecot: auth: Error: userdb(davidep,127.0.0.1,): user not found from any userdbs
Sep 15 11:52:41 vm5 dovecot: auth: Error: userdb(davidep,127.0.0.1,): user not found from any userdbs
Sep 15 11:54:47 vm5 dovecot: auth: Error: userdb(davidep,127.0.0.1,): user not found from any userdbs
Sep 15 11:56:53 vm5 dovecot: auth: Error: userdb(davidep,127.0.0.1,): user not found from any userdbs
Sep 15 11:58:59 vm5 dovecot: auth: Error: userdb(davidep,127.0.0.1,): user not found from any userdbs

does this happen while the user is logged off or starts once the user logs in?

My session seems expired, but those lines still appear…

Both situations.

Here, everything was logged off (during night).

I don’t see this happening on the test machine we use in common with Nethesis.
Can you check if this logging stops when you stop tomcat?
We need to be sure it’s coming from tomcat and not another daemon.

1 Like