Zentyal Forum, Linux Small Business Server

Zentyal Server => Installation and Upgrades => Topic started by: philmills on February 12, 2010, 02:40:24 pm

Title: 1.4 slave usersandgroups nasty bug
Post by: philmills on February 12, 2010, 02:40:24 pm
I'm running ebox 1.4 master/slave setup and am trying to give my user account administrator rights.
This must be done on the slave since the option isn't available on master due to the fact that file sharing shouldn't be installed on the master in a master/slave setup. see: http://trac.ebox-platform.com/wiki/Document/HowTo/EBoxMasterSlaveSetup#Master
However, when i try to enable administrator rights for a user i get this error:

Code: [Select]
A really nasty bug has occurred
Exception
Unknown error at EBox::UsersAndGroups::listSlaves No such object
Trace
Unknown error at EBox::UsersAndGroups::listSlaves No such object at /usr/share/perl5/EBox/Ldap.pm line 712
EBox::Ldap::_errorOnLdap('Net::LDAP::Search=HASH(0xaf08b54)', 'HASH(0xac045a8)') called at /usr/share/perl5/EBox/Ldap.pm line 351
EBox::Ldap::search('EBox::Ldap=HASH(0xa99090c)', 'HASH(0xac045a8)') called at /usr/share/perl5/EBox/UsersAndGroups.pm line 2865
EBox::UsersAndGroups::listSlaves('EBox::UsersAndGroups=HASH(0xa39f0fc)') called at /usr/share/perl5/EBox/UsersAndGroups.pm line 1508
EBox::UsersAndGroups::_updateGroupSlaves('EBox::UsersAndGroups=HASH(0xa39f0fc)', 'Domain Admins', 'op', 'add', 'user', 'PhilMills') called at /usr/share/perl5/EBox/UsersAndGroups.pm line 1488
EBox::UsersAndGroups::updateGroup('EBox::UsersAndGroups=HASH(0xa39f0fc)', 'Domain Admins', 'op', 'add', 'user', 'PhilMills') called at /usr/share/perl5/EBox/UsersAndGroups.pm line 1734
EBox::UsersAndGroups::addUserToGroup('EBox::UsersAndGroups=HASH(0xa39f0fc)', 'PhilMills', 'Domain Admins') called at /usr/share/perl5/EBox/Samba.pm line 844
EBox::Samba::setAdminUser('EBox::Samba=HASH(0x99eb7c4)', 'PhilMills', 'yes') called at /usr/share/perl5/EBox/CGI/Samba/ActiveSharing.pm line 79
EBox::CGI::Samba::ActiveSharing::_user('EBox::CGI::Samba::ActiveSharing=HASH(0xaccf65c)') called at /usr/share/perl5/EBox/CGI/Samba/ActiveSharing.pm line 86
EBox::CGI::Samba::ActiveSharing::_process('EBox::CGI::Samba::ActiveSharing=HASH(0xaccf65c)') called at /usr/share/perl5/EBox/CGI/Base.pm line 262
EBox::CGI::Base::run('EBox::CGI::Samba::ActiveSharing=HASH(0xaccf65c)') called at /usr/share/perl5/EBox/CGI/Run.pm line 120
EBox::CGI::Run::run('EBox::CGI::Run', 'Samba/ActiveSharing', 'EBox') called at /usr/share/ebox/cgi/ebox.cgi line 19
ModPerl::ROOT::ModPerl::Registry::usr_share_ebox_cgi_ebox_2ecgi::handler('Apache2::RequestRec=SCALAR(0xaed3780)') called at /usr/lib/perl5/ModPerl/RegistryCooker.pm line 204
eval {...} called at /usr/lib/perl5/ModPerl/RegistryCooker.pm line 204
ModPerl::RegistryCooker::run('ModPerl::Registry=HASH(0x9404534)') called at /usr/lib/perl5/ModPerl/RegistryCooker.pm line 170
ModPerl::RegistryCooker::default_handler('ModPerl::Registry=HASH(0x9404534)') called at /usr/lib/perl5/ModPerl/Registry.pm line 31
ModPerl::Registry::handler('ModPerl::Registry', 'Apache2::RequestRec=SCALAR(0xaed3780)') called at -e line 0
eval {...} called at -e line 0

To me it seems weird that in a master/slave setup, the slave has to be the PDC due to file sharing limitation on the master...

help...
Title: Re: 1.4 slave usersandgroups nasty bug
Post by: philmills on February 12, 2010, 03:52:57 pm
my guess is that the problem lies in the fact that, in order to make a user an administrator the slave tries to add the user to the administrators group.
as far as I can see, whenever I try to do any user/group assignments  on the slave it falls over with errors.
As a workaround I would add the user to the administrators group on the master, but that group isn't listed as an ebox group, so i can't.
Title: Re: 1.4 slave usersandgroups nasty bug
Post by: Saturn2888 on February 13, 2010, 11:57:21 pm
IF YOU RUN CODE BELOW, YOU WILL NEED TO RECONFIGURE USERS AND GROUPS

You might wanna try this:
Code: [Select]
/usr/share/ebox-usersandgroups/ebox-usersandgroups-reinstall
Title: Re: 1.4 slave usersandgroups nasty bug
Post by: can79 on February 14, 2010, 04:43:43 pm

IF YOU RUN CODE BELOW, YOU WILL NEED TO RECONFIGURE USERS AND GROUPS

You might wanna try this:
Code: [Select]
/usr/share/ebox-usersandgroups/ebox-usersandgroups-reinstall

does not work
I've re-installed 3 times.
I can not enable Administrations Rights on slave for samba.

I have ldap master Only Usersandgroups module
and a slave whit usersandgroups + samba module
Title: Re: 1.4 slave usersandgroups nasty bug
Post by: Saturn2888 on February 14, 2010, 05:04:06 pm
You have to deconfigure samba as well.
Code: [Select]
/usr/share/ebox/ebox-unconfigure-module samba
Title: Re: 1.4 slave usersandgroups nasty bug
Post by: can79 on February 15, 2010, 12:21:45 am
You have to deconfigure samba as well.
Code: [Select]
/usr/share/ebox/ebox-unconfigure-module samba

on master or slave?
slave installed only on samba
Title: Re: 1.4 slave usersandgroups nasty bug
Post by: Saturn2888 on February 15, 2010, 02:04:09 am
Whichever isn't working.
Title: Re: 1.4 slave usersandgroups nasty bug
Post by: can79 on February 15, 2010, 04:01:53 am
Whichever isn't working.

master Ebox
modules;
only users and groups installed as master

slave ebox
modules;
users and groups installed (as slave)
samba

everything works well

but
if i edit a user under users tab on master ebox does not exist a "Administration rights" option for samba
on edit a user under users tab on slave (where samba installed) there is a option "Administration rights" for users.
if i enable this option and save changes on slave.
I get exactly above error. (read first post)



Title: Re: 1.4 slave usersandgroups nasty bug
Post by: Saturn2888 on February 15, 2010, 05:20:34 am
I don't understand.
Title: Re: 1.4 slave usersandgroups nasty bug
Post by: philmills on February 15, 2010, 09:32:34 am
Its very clear if you read my original post, and read the wiki instructions for setting up master/slave

Samba is NOT and should NOT be installed on the master (according to the wiki article)
ONLY usersandgroups should be installed on the master

The slave has samba installed, but the slave is unable to create administrator rights for any user. When you try, you get the error which i posted first.
You cannot create administrator rights on the master either, as administrator rights option is only available if samba file sharing is installed.

its a very bad catch 22...


Title: Re: 1.4 slave usersandgroups nasty bug
Post by: christian on February 15, 2010, 01:24:48 pm
Basically what could solve this issue would be to enable and follow [LDAP] referral: doing so, you could, on server running Samba, define administrator. This will try to update LDAP group. Such request, performed on local LDAP server that is slave, should receive referral to master that will handle your request and modify group then replicated to slave ldap server. Am I correct ?

What I really don't understand here, since the beginning of this master/slave story, is the limitation preventing Samba to run on master LDAP server  ???
Title: Re: 1.4 slave usersandgroups nasty bug
Post by: ymangolds on February 15, 2010, 01:30:07 pm
I'm in the exact same situation. Finally got Master/Slave working but now can't make a user an admin of the PDC on the slave. My error code is a little different though:
Code: [Select]
A really nasty bug has occurred
Exception
Unknown error at EBox::UsersAndGroups::addUserToGroup Referral received
Trace
Unknown error at EBox::UsersAndGroups::addUserToGroup Referral received at /usr/share/perl5/EBox/Ldap.pm line 712
EBox::Ldap::_errorOnLdap('Net::LDAP::Modify=HASH(0xb7c3494)', 'HASH(0xb7bdda0)') called at /usr/share/perl5/EBox/Ldap.pm line 373
EBox::Ldap::modify('EBox::Ldap=HASH(0xa2a92a4)', 'cn=Domain Admins,ou=Groups,dc=c2istudios,dc=com', 'HASH(0xb7bdda0)') called at /usr/share/perl5/EBox/UsersAndGroups.pm line 1732
EBox::UsersAndGroups::addUserToGroup('EBox::UsersAndGroups=HASH(0x9fdbefc)', 'ymangolds', 'Domain Admins') called at /usr/share/perl5/EBox/Samba.pm line 844
EBox::Samba::setAdminUser('EBox::Samba=HASH(0xa793e94)', 'ymangolds', 'yes') called at /usr/share/perl5/EBox/CGI/Samba/ActiveSharing.pm line 79
EBox::CGI::Samba::ActiveSharing::_user('EBox::CGI::Samba::ActiveSharing=HASH(0xb7eac5c)') called at /usr/share/perl5/EBox/CGI/Samba/ActiveSharing.pm line 86
EBox::CGI::Samba::ActiveSharing::_process('EBox::CGI::Samba::ActiveSharing=HASH(0xb7eac5c)') called at /usr/share/perl5/EBox/CGI/Base.pm line 262
EBox::CGI::Base::run('EBox::CGI::Samba::ActiveSharing=HASH(0xb7eac5c)') called at /usr/share/perl5/EBox/CGI/Run.pm line 120
EBox::CGI::Run::run('EBox::CGI::Run', 'Samba/ActiveSharing', 'EBox') called at /usr/share/ebox/cgi/ebox.cgi line 19
ModPerl::ROOT::ModPerl::Registry::usr_share_ebox_cgi_ebox_2ecgi::handler('Apache2::RequestRec=SCALAR(0xb70c034)') called at /usr/lib/perl5/ModPerl/RegistryCooker.pm line 204
eval {...} called at /usr/lib/perl5/ModPerl/RegistryCooker.pm line 204
ModPerl::RegistryCooker::run('ModPerl::Registry=HASH(0xb791a34)') called at /usr/lib/perl5/ModPerl/RegistryCooker.pm line 170
ModPerl::RegistryCooker::default_handler('ModPerl::Registry=HASH(0xb791a34)') called at /usr/lib/perl5/ModPerl/Registry.pm line 31
ModPerl::Registry::handler('ModPerl::Registry', 'Apache2::RequestRec=SCALAR(0xb70c034)') called at -e line 0
eval {...} called at -e line 0
Title: Re: 1.4 slave usersandgroups nasty bug
Post by: philmills on February 15, 2010, 03:18:17 pm
What I really don't understand here, since the beginning of this master/slave story, is the limitation preventing Samba to run on master LDAP server  ???

nor do i - its a dumb limitation....
Title: Re: 1.4 slave usersandgroups nasty bug
Post by: ymangolds on February 15, 2010, 04:27:50 pm
In the master > users and groups > slave status I've got a list of pending actions on modifications I've done since I first joined the slave to the master. But the only button is "sync" which flashes a message that says "done" but the pending actions remain.
Title: Re: 1.4 slave usersandgroups nasty bug
Post by: philmills on February 16, 2010, 08:17:55 am
please start a new topic for that - its not the same bug
Title: Re: 1.4 slave usersandgroups nasty bug
Post by: philmills on February 16, 2010, 09:10:38 am
It should also be noted that without the ability to enable a samba administrator, its not possible to get any windows computers to join the samba domain.
Title: Re: 1.4 slave usersandgroups nasty bug
Post by: can79 on February 17, 2010, 04:33:22 am
and still no solution?
Title: Re: 1.4 slave usersandgroups nasty bug
Post by: philmills on February 17, 2010, 02:00:51 pm
seems not... are we all shouting into space?
Title: Re: 1.4 slave usersandgroups nasty bug
Post by: isaac on February 17, 2010, 03:47:29 pm
Your problem is duly noted and I'll have a look at it as soon as I have some time.

Cheers!
Title: Re: 1.4 slave usersandgroups nasty bug
Post by: Saturn2888 on February 17, 2010, 04:30:31 pm
Another thing I don't understand. You can't get computers to login the domain so long as no one has the admin checkbox?
Title: Re: 1.4 slave usersandgroups nasty bug
Post by: isaac on February 17, 2010, 09:53:44 pm
To all the space shouters out there, I think I just fixed the problem in the SVN.

It should be fixed in the next release, just wait for the next update of ebox-usersandgroups.

Please note that you might have problems with a given user if you already tried to set it as admin.

You can fix that by installing ldapvi in the slave:
Code: [Select]
sudo apt-get install ldapvi
,
running:
Code: [Select]
ldapvi -D "cn=ebox,dc=hardy4" --bind simple -w $(sudo cat /var/lib/ebox/conf/ebox-ldap.passwd) -b "dc=hardy4"
with your DN instead of dc=hardy4 (you can check it in the LDAP Info section in the master).

This will launch an editor with the content of your LDAP slave and there you should delete the memberUid: lines from the Domain Admins and Administrators groups. Save changes and then you should be able to set users as admin without any problem.

Remember you have to wait for the new ebox-usersandgroups update.

Cheers and sorry about this problem :)
Title: Re: 1.4 slave usersandgroups nasty bug
Post by: philmills on February 18, 2010, 02:43:31 pm
thanks isaac - much appreciated!
Title: Re: 1.4 slave usersandgroups nasty bug
Post by: eboxbuggy on February 20, 2010, 11:51:02 am
i can confirm deleting member uid does not work. giving a user "admin" access in ebox gives this error
Code: [Select]
A really nasty bug has occurred
Exception
Unknown error at EBox::UsersAndGroups::addUserToGroup Referral received
Trace
Unknown error at EBox::UsersAndGroups::addUserToGroup Referral received at /usr/share/perl5/EBox/Ldap.pm line 712
EBox::Ldap::_errorOnLdap('Net::LDAP::Modify=HASH(0xb943d24)', 'HASH(0xb8bfee4)') called at /usr/share/perl5/EBox/Ldap.pm line 373
EBox::Ldap::modify('EBox::Ldap=HASH(0xa1d07f8)', 'cn=Domain Admins,ou=Groups,dc=server,dc=domain,dc=com', 'HASH(0xb8bfee4)') called at /usr/share/perl5/EBox/UsersAndGroups.pm line 1732
EBox::UsersAndGroups::addUserToGroup('EBox::UsersAndGroups=HASH(0x9f16088)', 'adminuser', 'Domain Admins') called at /usr/share/perl5/EBox/Samba.pm line 844
EBox::Samba::setAdminUser('EBox::Samba=HASH(0xa6bb4bc)', 'adminuser', 'yes') called at /usr/share/perl5/EBox/CGI/Samba/ActiveSharing.pm line 79
EBox::CGI::Samba::ActiveSharing::_user('EBox::CGI::Samba::ActiveSharing=HASH(0xb95fc6c)') called at /usr/share/perl5/EBox/CGI/Samba/ActiveSharing.pm line 86
EBox::CGI::Samba::ActiveSharing::_process('EBox::CGI::Samba::ActiveSharing=HASH(0xb95fc6c)') called at /usr/share/perl5/EBox/CGI/Base.pm line 262
EBox::CGI::Base::run('EBox::CGI::Samba::ActiveSharing=HASH(0xb95fc6c)') called at /usr/share/perl5/EBox/CGI/Run.pm line 120
EBox::CGI::Run::run('EBox::CGI::Run', 'Samba/ActiveSharing', 'EBox') called at /usr/share/ebox/cgi/ebox.cgi line 19
ModPerl::ROOT::ModPerl::Registry::usr_share_ebox_cgi_ebox_2ecgi::handler('Apache2::RequestRec=SCALAR(0xb94337c)') called at /usr/lib/perl5/ModPerl/RegistryCooker.pm line 204
eval {...} called at /usr/lib/perl5/ModPerl/RegistryCooker.pm line 204
ModPerl::RegistryCooker::run('ModPerl::Registry=HASH(0xb8c0b08)') called at /usr/lib/perl5/ModPerl/RegistryCooker.pm line 170
ModPerl::RegistryCooker::default_handler('ModPerl::Registry=HASH(0xb8c0b08)') called at /usr/lib/perl5/ModPerl/Registry.pm line 31
ModPerl::Registry::handler('ModPerl::Registry', 'Apache2::RequestRec=SCALAR(0xb94337c)') called at -e line 0
eval {...} called at -e line 0

if i go back to editing, memberUid:adminuser is there. i now try to join domain in winxp. login failure or access denied

edit: i manually added the adminuser both in administrators & domain admin and can now login.

another problem though: i can only login the domain with admin user. normal users cannot login. check domain and password error
Title: Re: 1.4 slave usersandgroups nasty bug
Post by: eboxbuggy on February 20, 2010, 12:21:30 pm
 ??? philmills you said your LDAP works both on master/slave right? new users & groups added in master are updated on the slave right? I thought mine did until I tried to edit the group on the slave.

Code: [Select]
A really nasty bug has occurred
Exception
Can't call method "get_value" on an undefined value
Trace
Can't call method "get_value" on an undefined value at /usr/share/perl5/EBox/SambaLdapUser.pm line 740.

Can you try checking groups please?

edit: ;D I think I had too much coffee today. LDAP Slave Groups now work by removing samba ;D
Title: Re: 1.4 slave usersandgroups nasty bug
Post by: philmills on February 22, 2010, 11:01:54 am
I can see users and groups in both master and slave
My understanding though is that user and group changes should be made on the master not on the slave. the synchronisation between master and slave is not two-way, but rather is one way: Master -> Slave.  I'm not sure we can assume that Master/Slave works like PDC/BDC relationship in Windows server in respect to user accounts and groups...

Can any ebox team please confirm my understanding is correct?

Removing samba on the slave in order to get LDAP groups working, in my opinion renders the slave as good as useless, in that I'll be left with a slave which does nothing at all. Its bad enough that i can't run samba on the master. If its not on the slave either, then i may as well not have any servers at all.
Title: Re: 1.4 slave usersandgroups nasty bug
Post by: isaac on February 22, 2010, 11:42:21 am
An eBox will always act as a PDC whether it is a standalone eBox or a slave eBox.

ebox-usersandgroups 1.4.3 is already available in the repository and contains the fix I did.
Title: Re: 1.4 slave usersandgroups nasty bug
Post by: philmills on February 22, 2010, 03:09:50 pm
great  - thanks, i'll try it out
Title: Re: 1.4 slave usersandgroups nasty bug
Post by: eboxbuggy on February 22, 2010, 03:47:51 pm
had some errors on dist-upgrade
Code: [Select]
Setting up ebox-ca (1.4.1-0ubuntu1~ppa1~hardy1) ...
Use of uninitialized value in subroutine entry at /usr/share/perl5/EBox/Gettext.pm line 48.
Use of uninitialized value in subroutine entry at /usr/share/perl5/EBox/Gettext.pm line 49.
Use of uninitialized value in subroutine entry at /usr/share/perl5/EBox/Gettext.pm line 72.

testing samba ldap slave now will report results after  ;D crossfingers
Title: Re: 1.4 slave usersandgroups nasty bug
Post by: eboxbuggy on February 22, 2010, 04:41:35 pm
woot  ;D

samba pdc on slave now working ... thanks I can now sleep soundly tonight  ;D
Title: Re: 1.4 slave usersandgroups nasty bug
Post by: isaac on February 22, 2010, 04:43:50 pm
Good :)
Title: Re: 1.4 slave usersandgroups nasty bug
Post by: Saturn2888 on February 22, 2010, 05:27:13 pm
I am wondering if anyone else is not having issues. If I am the only one with a working setup, I might be able to help figure out why that is and pinpoint the root of the bug.

That's cool you fixed it issac!  Is an eBox by itself considered a master without slaves?
Title: Re: 1.4 slave usersandgroups nasty bug
Post by: isaac on February 22, 2010, 07:24:24 pm
Yeah, until the moment you install a module that depends on usersandgroups. From then on you shouldn't add slaves to it.
Title: Re: 1.4 slave usersandgroups nasty bug
Post by: eboxbuggy on February 22, 2010, 07:31:32 pm
Uhmm ... I hate to be the bringer of bad news but I just caught a bug
Code: [Select]
A really nasty bug has occurred
Exception
Unknown error at EBox::SambaLdapUser::_getAccountFlags Referral received
Trace
Unknown error at EBox::SambaLdapUser::_getAccountFlags Referral received at /usr/share/perl5/EBox/Ldap.pm line 712
EBox::Ldap::_errorOnLdap('Net::LDAP::Search=HASH(0xb864994)', 'HASH(0xaafda6c)') called at /usr/share/perl5/EBox/Ldap.pm line 351
EBox::Ldap::search('EBox::Ldap=HASH(0xa1b46d4)', 'HASH(0xaafda6c)') called at /usr/share/perl5/EBox/SambaLdapUser.pm line 848
EBox::SambaLdapUser::_getAccountFlags('EBox::SambaLdapUser=HASH(0xb7e11ec)', 'username1') called at /usr/share/perl5/EBox/SambaLdapUser.pm line 858
EBox::SambaLdapUser::_userSharing('EBox::SambaLdapUser=HASH(0xb7e11ec)', 'username1') called at /usr/share/perl5/EBox/SambaLdapUser.pm line 459
EBox::SambaLdapUser::_userAddOns('EBox::SambaLdapUser=HASH(0xb7e11ec)', 'username1') called at /usr/share/perl5/EBox/UsersAndGroups.pm line 2137
EBox::UsersAndGroups::allUserAddOns('EBox::UsersAndGroups=HASH(0x9efa0e4)', 'username1') called at /usr/share/perl5/EBox/CGI/UsersAndGroups/User.pm line 50
EBox::CGI::UsersAndGroups::User::_process('EBox::CGI::UsersAndGroups::User=HASH(0xb762c00)') called at /usr/share/perl5/EBox/CGI/Base.pm line 262
EBox::CGI::Base::run('EBox::CGI::UsersAndGroups::User=HASH(0xb762c00)') called at /usr/share/perl5/EBox/CGI/Run.pm line 120
EBox::CGI::Run::run('EBox::CGI::Run', 'UsersAndGroups/User', 'EBox') called at /usr/share/ebox/cgi/ebox.cgi line 19
ModPerl::ROOT::ModPerl::Registry::usr_share_ebox_cgi_ebox_2ecgi::handler('Apache2::RequestRec=SCALAR(0xb608788)') called at /usr/lib/perl5/ModPerl/RegistryCooker.pm line 204
eval {...} called at /usr/lib/perl5/ModPerl/RegistryCooker.pm line 204
ModPerl::RegistryCooker::run('ModPerl::Registry=HASH(0xb70d580)') called at /usr/lib/perl5/ModPerl/RegistryCooker.pm line 170
ModPerl::RegistryCooker::default_handler('ModPerl::Registry=HASH(0xb70d580)') called at /usr/lib/perl5/ModPerl/Registry.pm line 31
ModPerl::Registry::handler('ModPerl::Registry', 'Apache2::RequestRec=SCALAR(0xb608788)') called at -e line 0
eval {...} called at -e line 0

I was happily adding users on the master. Went to slave, user, edit and bingo.

update: all my new users have bugs. the first 2 users I created useradmin1 and normaluser are working?  ???
update 2: i have 6 pages worth of updates on my master. clicking on force sync does nothing
Code: [Select]
https://master/ebox/Users/Composite/SlaveInfoupdate 3: /home/samba/users/ only have the 3 original users. Me, useradmin1 and normaluser ??? do I need to manually create directories for the new users? I think the reason for this is that you have to create all the users on master before enabling samba on slave.
update 4: no go on creating the directory manually in /home/samba/users same bug message
update 5: confirmed. you need to create all users/groups on master before enabling samba on slave. PITA though if you missed a user you have to recreate everything on slave lol  ;D
Title: Re: 1.4 slave usersandgroups nasty bug
Post by: eboxbuggy on February 23, 2010, 11:49:52 am
How the heck am I the only one without problems? Haha. I guess my knack for breaking things fixed this. That's cool you fixed it issac! That means I can setup eBox in the workplace without being scared about that anymore. Is an eBox by itself considered a master without slaves?

Hey Sat ... as much as I would like to believe you have your ebox working, there are a couple of bugs that keeps popping up. Unless you are one of the devs and fix everything by yourself.

We haven't heard much bugs on your samba slave so I would assume everything on it is PERFECT. Even without Isaac's fix.

Can you do the following for us then? And report back if yours does work PERFECTLY?  ::)
1) add new users on master ebox and check if they can login to winxp domain
2) edit new user on slave and make him an administrator for the domain
Title: Re: 1.4 slave usersandgroups nasty bug
Post by: eboxbuggy on February 23, 2010, 05:52:58 pm
my samba bug was caused by master having pending operations in sync
fixed it by
Code: [Select]
rm -rf /var/lib/ebox/conf/userjournal/*
Title: Re: 1.4 slave usersandgroups nasty bug
Post by: Saturn2888 on February 23, 2010, 06:27:11 pm
I did them both without any issues.
Title: Re: 1.4 slave usersandgroups nasty bug
Post by: isaac on February 23, 2010, 06:27:54 pm
Good to hear :)
Title: Re: 1.4 slave usersandgroups nasty bug
Post by: ownu00 on March 10, 2010, 05:16:47 am
I actually have this bug right now when I try to edit all users on the slave, on the master I have all these Ldap jobs queued.

Code: [Select]
A really nasty bug has occurred
Exception
Unknown error at EBox::SambaLdapUser::_getAccountFlags Referral received
Trace
Unknown error at EBox::SambaLdapUser::_getAccountFlags Referral received at /usr/share/perl5/EBox/Ldap.pm line 712
EBox::Ldap::_errorOnLdap('Net::LDAP::Search=HASH(0xb864994)', 'HASH(0xaafda6c)') called at /usr/share/perl5/EBox/Ldap.pm line 351
EBox::Ldap::search('EBox::Ldap=HASH(0xa1b46d4)', 'HASH(0xaafda6c)') called at /usr/share/perl5/EBox/SambaLdapUser.pm line 848
EBox::SambaLdapUser::_getAccountFlags('EBox::SambaLdapUser=HASH(0xb7e11ec)', 'username1') called at /usr/share/perl5/EBox/SambaLdapUser.pm line 858
EBox::SambaLdapUser::_userSharing('EBox::SambaLdapUser=HASH(0xb7e11ec)', 'username1') called at /usr/share/perl5/EBox/SambaLdapUser.pm line 459
EBox::SambaLdapUser::_userAddOns('EBox::SambaLdapUser=HASH(0xb7e11ec)', 'username1') called at /usr/share/perl5/EBox/UsersAndGroups.pm line 2137
EBox::UsersAndGroups::allUserAddOns('EBox::UsersAndGroups=HASH(0x9efa0e4)', 'username1') called at /usr/share/perl5/EBox/CGI/UsersAndGroups/User.pm line 50
EBox::CGI::UsersAndGroups::User::_process('EBox::CGI::UsersAndGroups::User=HASH(0xb762c00)') called at /usr/share/perl5/EBox/CGI/Base.pm line 262
EBox::CGI::Base::run('EBox::CGI::UsersAndGroups::User=HASH(0xb762c00)') called at /usr/share/perl5/EBox/CGI/Run.pm line 120
EBox::CGI::Run::run('EBox::CGI::Run', 'UsersAndGroups/User', 'EBox') called at /usr/share/ebox/cgi/ebox.cgi line 19
ModPerl::ROOT::ModPerl::Registry::usr_share_ebox_cgi_ebox_2ecgi::handler('Apache2::RequestRec=SCALAR(0xb608788)') called at /usr/lib/perl5/ModPerl/RegistryCooker.pm line 204
eval {...} called at /usr/lib/perl5/ModPerl/RegistryCooker.pm line 204
ModPerl::RegistryCooker::run('ModPerl::Registry=HASH(0xb70d580)') called at /usr/lib/perl5/ModPerl/RegistryCooker.pm line 170
ModPerl::RegistryCooker::default_handler('ModPerl::Registry=HASH(0xb70d580)') called at /usr/lib/perl5/ModPerl/Registry.pm line 31
ModPerl::Registry::handler('ModPerl::Registry', 'Apache2::RequestRec=SCALAR(0xb608788)') called at -e line 0
eval {...} called at -e line 0

I used the Ebox 1.4 CD and followed these instructions at the letters.
Code: [Select]
http://trac.ebox-platform.com/wiki/Document/HowTo/EBoxMasterSlaveSetup
I tried the eboxbuggy tricks to remove the Ldap master queue with
Code: [Select]
rm -rf /var/lib/ebox/conf/userjournal/* the queud is cleared but every-time I make some new user in the master when I go in the slave to edit them to make them domain admin I get the  "A really nasty bug has occurred" from below.

What make it strange is I made 3 clean install with the strict minimum like in the EBoxMasterSlaveSetup but by default its not working.

A simple question, in the guide they say this.
Code: [Select]
sudo apt-get install ebox-usersandgroups apparmor-Do I have to actually reinstall ebox-usersandgroups with the apparmor- even if I installed using the Ebox official 1.4 release CD?

Thank you for your precious times and sorry for my bad English.



Title: Re: 1.4 slave usersandgroups nasty bug
Post by: Saturn2888 on March 10, 2010, 05:34:16 am
Have you installed any eBox 1.4 updates?
Title: Re: 1.4 slave usersandgroups nasty bug
Post by: ownu00 on March 10, 2010, 06:20:54 am
I think so, when you install the official Ebox 1.4 CD in the post install script its downloading the latest stable package database to be sure you have the latest version.

Do I need to get out of stable and use the SVN?
Title: Re: 1.4 slave usersandgroups nasty bug
Post by: Saturn2888 on March 10, 2010, 06:32:22 am
No, I am on stable. What version is yours? 1.4.3 is mine.
Title: Re: 1.4 slave usersandgroups nasty bug
Post by: ownu00 on March 10, 2010, 06:36:29 am
Same version here, but for me by default its not working.

You did absolutely nothing more than installing the latest version and follow the Master Slave guide?

Anyway I have to go to sleep thank you Saturn2888, i will check back here tomorrow.

I hope I find the problem I want to implement this in a little school.

Ive been using Debian forever for server but they want to administer users themselves so Ebox is actually the only good solution available and user friendly enough!  ;D
Title: Re: 1.4 slave usersandgroups nasty bug
Post by: Saturn2888 on March 10, 2010, 08:07:34 am
You might wanna do something like this:
/usr/share/ebox-usersandgroups/ebox-usersandgroups-reinstall
/usr/share/ebox/ebox-unconfigure-module samba

But those reinstall eBox modules. It depends on what you have enabled. What did you install? Is mail installed too? If so, use this too: /usr/share/ebox/ebox-unconfigure-module mail
Title: Re: 1.4 slave usersandgroups nasty bug
Post by: eboxbuggy on March 12, 2010, 02:37:15 pm
What make it strange is I made 3 clean install with the strict minimum like in the EBoxMasterSlaveSetup but by default its not working.
Believe me I know the feeling. I had to reinstall everything myself both on VM and on the actual servers themselves.

1) Make sure all modules are updated
2) Do what Saturn said first on slave
Code: [Select]
/usr/share/ebox-usersandgroups/ebox-usersandgroups-reinstall
/usr/share/ebox/ebox-unconfigure-module samba
3) Do that also on master (which will delete all your users & groups)
4) Do this on master to delete the job queues
Code: [Select]
rm -rf /var/lib/ebox/conf/userjournal/*5) Add all your users and groups on master
6) Add your slave to the ldap master
7) Enable samba on your slave
Title: Re: 1.4 slave usersandgroups nasty bug
Post by: ownu00 on March 12, 2010, 03:31:42 pm
I think I will have time to try this tomorrow  :)

Since you had the exact same problem as me I think the chance of success is quite high.

If its working can I actually add user after without having to disable samba every times?
Title: Re: 1.4 slave usersandgroups nasty bug
Post by: Saturn2888 on March 13, 2010, 06:55:37 am
I did this a lot back in eBox 1.3 to 1.4.
Title: Re: 1.4 slave usersandgroups nasty bug
Post by: eboxbuggy on March 14, 2010, 04:19:30 am
I think I will have time to try this tomorrow  :)

Since you had the exact same problem as me I think the chance of success is quite high.

If its working can I actually add user after without having to disable samba every times?

Yes. Deleting the job queues on master fixed my problems as slave was not creating the new user's directories.
Title: Re: 1.4 slave usersandgroups nasty bug
Post by: Andy on March 18, 2010, 04:59:06 pm
Sorry, I don't understand this.

Why should you now be able to create users (and groups) on the master and sync it without any problems?

The users I created before activating shares on the slave are editable on the slave.
But after activating I create an user on the master, the master tries to load (or sync) without end.
On the slave I can see the new users but on the slave running Samba I get that nasty bug message.

I installed all servers with ebox 1.4 from CD an updated all to 1.43 before creating users or activating slaves...

Can you help me?

Title: Re: 1.4 slave usersandgroups nasty bug
Post by: ownu00 on March 18, 2010, 06:51:54 pm
I finally got the time to test this. I can confirm its working great BUT all the subsequent added users still have the bug after the ebox-filesharing is enabled and those created before all work great.

The problem is you can't add users after the setup is complete they will not work in the slave.

Code: [Select]
A really nasty bug has occurred
Exception
Unknown error at EBox::SambaLdapUser::_getAccountFlags Referral received
Trace
Unknown error at EBox::SambaLdapUser::_getAccountFlags Referral received at /usr/share/perl5/EBox/Ldap.pm line 712
EBox::Ldap::_errorOnLdap('Net::LDAP::Search=HASH(0xb58d46c)', 'HASH(0xb51f324)') called at /usr/share/perl5/EBox/Ldap.pm line 351
EBox::Ldap::search('EBox::Ldap=HASH(0xb2a206c)', 'HASH(0xb51f324)') called at /usr/share/perl5/EBox/SambaLdapUser.pm line 848
EBox::SambaLdapUser::_getAccountFlags('EBox::SambaLdapUser=HASH(0xb58d7cc)', 'wham2') called at /usr/share/perl5/EBox/SambaLdapUser.pm line 858
EBox::SambaLdapUser::_userSharing('EBox::SambaLdapUser=HASH(0xb58d7cc)', 'wham2') called at /usr/share/perl5/EBox/SambaLdapUser.pm line 459
EBox::SambaLdapUser::_userAddOns('EBox::SambaLdapUser=HASH(0xb58d7cc)', 'wham2') called at /usr/share/perl5/EBox/UsersAndGroups.pm line 2142
EBox::UsersAndGroups::allUserAddOns('EBox::UsersAndGroups=HASH(0xab05a88)', 'wham2') called at /usr/share/perl5/EBox/CGI/UsersAndGroups/User.pm line 50
EBox::CGI::UsersAndGroups::User::_process('EBox::CGI::UsersAndGroups::User=HASH(0xb4b4c5c)') called at /usr/share/perl5/EBox/CGI/Base.pm line 262
EBox::CGI::Base::run('EBox::CGI::UsersAndGroups::User=HASH(0xb4b4c5c)') called at /usr/share/perl5/EBox/CGI/Run.pm line 120
EBox::CGI::Run::run('EBox::CGI::Run', 'UsersAndGroups/User', 'EBox') called at /usr/share/ebox/cgi/ebox.cgi line 19
ModPerl::ROOT::ModPerl::Registry::usr_share_ebox_cgi_ebox_2ecgi::handler('Apache2::RequestRec=SCALAR(0xb58e198)') called at /usr/lib/perl5/ModPerl/RegistryCooker.pm line 204
eval {...} called at /usr/lib/perl5/ModPerl/RegistryCooker.pm line 204
ModPerl::RegistryCooker::run('ModPerl::Registry=HASH(0x980809c)') called at /usr/lib/perl5/ModPerl/RegistryCooker.pm line 170
ModPerl::RegistryCooker::default_handler('ModPerl::Registry=HASH(0x980809c)') called at /usr/lib/perl5/ModPerl/Registry.pm line 31
ModPerl::Registry::handler('ModPerl::Registry', 'Apache2::RequestRec=SCALAR(0xb58e198)') called at -e line 0
eval {...} called at -e line 0

I can reproduce this problem 100% of the time.
Title: Re: 1.4 slave usersandgroups nasty bug
Post by: Andy on March 18, 2010, 07:06:11 pm
Yes, same problem.
But look in Reply # 46 by "eboxbuggy":

He wrote that it's possible to add users with Samba enabled. It seems that only the sync queue had to be cleared.
I did that also and the pending operations disappeared. But the error still appears when I try to edit an "after-filesharing"-user...

I looked after the homedirs of the problem-users, they doesn't exist! But I didn't found something about that in the logs...

I like ebox, it's really a great software. But if it works I'll love it   ;D
Title: Re: 1.4 slave usersandgroups nasty bug
Post by: Saturn2888 on March 18, 2010, 08:14:34 pm
Technically I wrote that, haha. I have Samba enabled and I have users.
Title: Re: 1.4 slave usersandgroups nasty bug
Post by: ownu00 on March 18, 2010, 08:24:24 pm
I do not doubt that Saturn2888  :D

But if you install ebox from scratch right now with the release CD

Do all updates

Follow the guide at the letter in the doc

It will not work.

Its not so bad when you can do work around but its puzzling when its not working with the official release cd by default after update.
Title: Re: 1.4 slave usersandgroups nasty bug
Post by: Saturn2888 on March 19, 2010, 03:02:55 am
Yes, it's maddening, but at least there's a usable workaround for now. Issac will hopefully fix it soon enough.
Title: Re: 1.4 slave usersandgroups nasty bug
Post by: Andy on March 19, 2010, 09:13:40 am
Hello Saturn,

can you explain me the workaround?

Do I have to watch for the sequence (activating users&groups, adding slave, creating users, activating filesharing and so on)?
Title: Re: 1.4 slave usersandgroups nasty bug
Post by: Saturn2888 on March 19, 2010, 09:33:12 am
I think eboxbuggy know my workaround better than me because s/he's done it far more recently and on 1.4 as well. I still have a text file with the information saved if needed.