Script Import-users - How to add user to a group?

The script ( works perfectly but is it possible to add fields matching groups

User1 depends of group Group1
User2 depends of group Group2

I would like to test with a lot of users and I’ll take a long time to associate them to the groups.

No way to do this now, maybe in the future. A customer asked this feature yet, on payment, hence it will probably be released on NethServer as well.

Ok, thanks

When the customer will pay, the feature will be available to all, for sure!

1 Like

Thanks to this unknown benefactor

1 Like

I moved a post to a new topic: New selector for groups


a script like this one:

while read p; do
#echo $p
user=`echo $p | cut -d \| -f 1`
group=`echo $p | cut -d \| -f 2`

actmembers=$(db accounts getprop $group Members)

if [ $actmembers ]; then
db accounts setprop $group Members $actmembers,$user
db accounts setprop $group Members $user 

signal-event group-modify $group

done <import.lst

and a file like


should do the trick

tested only a bit, YMMV


Very good man. Thanks a lot!

the script to import is there /usr/share/doc/nethserver-directory-2.2.0/import_users

that could be tricked in perl