User import on NS7

Yes now I see, we’ll be back after the break :smiley:

User import went fine, passwords were set (except for the ones with less than 7 chars), testing email creation and adding to groups after the break.

Ps. would this script


still work for adding existing users to existing groups, without breaking to much ?

1 Like

We should ask @paspo, but I guess it was written for ns6…

import_emails script does nothing :

[root@nethserver ~]# /usr/share/doc/nethserver-sssd-1.0.8/scripts/import_emails /tmp/userimport-email.tsv
[WARNING] Account indra does not exist, skipped.

and nothing in messages log file

1 Like

Also

[root@nethserver ~]# db accounts show
jabberadmins=group
Description=Jabber Administrators
Members=admin
Removable=no
[root@nethserver ~]#

Shouldn’t the new accounts be in there too?
New users are show on the server-manager, Users and groups page, and can login to owncloud with their proper credentials. Didn’t try samba as I haven’t applied the workgroup fix yet.

Should I run something to sync the users to the database?

No, the accounts DB does not contain user and group entries any longer since ns7.

The jabberadmins entry is probably a legacy one, we should remove it!

1 Like

Any other way on the CLI for checking if the accounts got imported properly?
And anything more I can test for email and maybe groups import scripts? :innocent:

1 Like

I’m working on the “Users and groups” page and providing a testing package soon! Stay tuned!

2 Likes

Yep. NS7 is a totally different beast.

3 Likes

Hurray - Email import works!

This morning I did another update of nethserver-sssd (Updating : nethserver-sssd-1.0.8-1.33.gab57573.ns7.noarch) and did a /usr/share/doc/nethserver-sssd-1.0.8/scripts/import_emails /tmp/emailimport-test.tsv
and got this in return : [INFO] imported indra.pharazijn@noble-house.tk

this is what I found in messages

Dec 6 08:15:58 nethserver /usr/share/doc/nethserver-sssd-1.0.8/scripts/import_emails[10651]: /var/lib/nethserver/db/accounts: OLD indra.pharazijn@noble-house.tk=(undefined)
Dec 6 08:15:58 nethserver /usr/share/doc/nethserver-sssd-1.0.8/scripts/import_emails[10651]: /var/lib/nethserver/db/accounts: NEW indra.pharazijn@noble-house.tk=pseudonym|Access|public|Account|indra@noble-house.tk|Description|
Dec 6 08:15:58 nethserver import_emails: Event: pseudonym-create indra.pharazijn@noble-house.tk
Dec 6 08:15:58 nethserver import_emails: expanding /etc/postfix/internal_access
Dec 6 08:15:58 nethserver dbus[789]: [system] Activating via systemd: service name=‘org.freedesktop.timedate1’ unit='dbus-org.freedesktop.timedate1.service’
Dec 6 08:15:58 nethserver dbus-daemon: dbus[789]: [system] Activating via systemd: service name=‘org.freedesktop.timedate1’ unit='dbus-org.freedesktop.timedate1.service’
Dec 6 08:15:58 nethserver systemd: Starting Time & Date Service…
Dec 6 08:15:58 nethserver dbus[789]: [system] Successfully activated service 'org.freedesktop.timedate1’
Dec 6 08:15:58 nethserver systemd: Started Time & Date Service.
Dec 6 08:15:58 nethserver dbus-daemon: dbus[789]: [system] Successfully activated service 'org.freedesktop.timedate1’
Dec 6 08:15:58 nethserver import_emails: expanding /etc/postfix/virtual
Dec 6 08:15:58 nethserver import_emails: Action: /etc/e-smith/events/actions/generic_template_expand SUCCESS [0.301509]
Dec 6 08:15:59 nethserver import_emails: Action: /etc/e-smith/events/pseudonym-create/S30nethserver-mail-postmap-update SUCCESS [0.403681]
Dec 6 08:15:59 nethserver import_emails: Event: pseudonym-create SUCCESS

Looks great, now I’ll try with multiple aliases. And will there be a script for adding users to groups?

Ps [root@nethserver ~]# db accounts show

indra.pharazijn@noble-house.tk=pseudonym
Access=public
Account=indra@noble-house.tk
Description=
jabberadmins=group
Description=Jabber Administrators
Members=admin
Removable=no

2 Likes

We’ll fix it soon for the next nethserver-ejabberd release /cc @giacomo

Oh yes, I know. np
Just added the accounts thingy for the pseudonym entry.
I don’t know what is expected behavior, just sharing what I think might be related, but not necessarily faulty :innocent:

Entry removed:

2 Likes

Updated to nethserver-ejabberd-1.1.2-1.4.gefc8d63.ns7.noarch from nethserver-testing
Anything I can do to test expected behavior on the running test server or should it be tested on a fresh install?

I just pushed the commit, but I haven’t built a new rpm. I think there is no need to test this fix which is trivial :slight_smile:

But thanks for your offer!

1 Like

Just moved on #development it doesn’t look a support discussion anymore :slight_smile: Thanks @indra great topic!

1 Like

With pleasure, and thank you for all the help.
I’m not a great fan of discussions anyways, I like to get results :innocent:

Ps @davidep, no rush but just wonderin if there is a group import script in the pipeline :slight_smile:

Yes, of course! It should be trivial to write it down, as long as the input format reflects the group-create event arguments. It should be:

<groupname> SEP <member1> SEP <member2> [ SEP <memberN> ]...

BTW, for very large groups, I think we should support reading the group members from a file. We could introduce a new convention: if any of the memberX arguments to group-create and group-modify begins with /tmp it is a temporary file containing group members, one per line. /cc @dev_team

Edit: nevermind, the args limit seems large enough:

xargs --show-limits
Your environment variables take up 2269 bytes
POSIX upper limit on argument length (this system): 2092835
POSIX smallest allowable upper limit on argument length (all systems): 4096
Maximum length of command we could actually use: 2090566
Size of command buffer we are actually using: 131072
2 Likes

Right, forgive my ignorance, I’ve got used to debian/ubuntu ways. Of course group management is available from the command line through signal-event group-create and group-modify. I’m such a noob :blush:

So yes anyways, I did signal-event group-create group1 user1 user2 user3
Works perfectly as expected, thanks again. :smile:

2 Likes

Now when I want to import the email aliases on my VM test server, it still doesn’t find the accounts :

[WARNING] Account indra does not exist, skipped.

Upgraded nethserver-sssd from testing, but still no import. very strange.

Tried it again on a freshly installed test server (not VM) and works without a glitch.
Dunno whats wrong with the VM, is clean install too though.