Yubico Forum

...visit our web-store at store.yubico.com
It is currently Tue Jan 30, 2018 12:04 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 6 posts ] 
Author Message
PostPosted: Tue Mar 19, 2013 3:42 pm 
Offline

Joined: Tue Mar 19, 2013 3:35 pm
Posts: 3
Hi,

After asigning a yubikey to a user, the yubikey status is green (OK) in the "List Yubikeys" tab.

But in the users/groups tab under Domain, the status for the same user is a red cross (KO).

Thanks!


Top
 Profile  
Reply with quote  

Share On:

Share on Facebook FacebookShare on Twitter TwitterShare on Tumblr TumblrShare on Google+ Google+

PostPosted: Thu Mar 21, 2013 7:03 am 
Offline
Yubico Team
Yubico Team

Joined: Mon Feb 22, 2010 9:49 am
Posts: 183
Hello,

Please send the following Log files at "support@yubico.com" .

1. Please configure the log files with the following settings from the webmin console:
1. Login to webmin
2. Go to "System" >> "System Logs"
3. Click on log file (ykropval.log ,etc. mentioned below)
4. Select "all" option in "priorities" field of "Message types to log" section
5. Please click on "save" button to save the changes.
6. Please repeat step 3, 4 and 5 for other log files mentioned below.
7. Please click on "Apply Changes" button on System Logs page
8. Go to "Servers" >> "YubiRADIUS Virtual Appliance"
9. Navigate 'Global Configuration' >> 'FreeRADIUS' menu, please enable FreeRADIUS Logging
10. Could you please ssh to the YRVA instance and restart the rsyslog process by executing the following command:
/etc/init.d/rsyslog restart
11. Please try to add the user and test the user with YubiKey credentials.

Please send us the following log files:
/var/log/syslog
/var/log/messages
/var/log/ykval.log
/var/log/ykropval.log
/var/log/ykmap.log
/var/log/freeradius/radius.log
/var/log/postgresql/postgresql-8.4-main.log
/var/log/apache2/error.log
/var/log/apache2/access.log
/var/log/debug

2. If you have already configure the webmin logs, please send "webmin.debug" file available at /var/webmin/webmin.debug

If not please configure the log file with the following settings from the webmin console:
1. Login to webmin
2. Go to "Webmin" >> "Webmin Configuration"
3. Please Click on "Debugging Log File"
4. Please Click on "yes" option of "Debug log enabled?"
5. Please click on "save" button to save the changes.
6. Please once again Import Users.

Please find the "webmin.debug" file at /var/webmin/webmin.debug

3. Please brief on any other observations and please send the screen shots, error messages observed.

Thanks and best regards,
Samir.


Top
 Profile  
Reply with quote  
PostPosted: Thu Mar 21, 2013 6:17 pm 
Offline

Joined: Tue Mar 19, 2013 3:35 pm
Posts: 3
Hi Samir,

I'm looking at the logs and it could be a case-sensitive problem?

Mar 21 18:00:15 yrva361 ykmap[24727]: LOG_DEBUG:ykmap-synclib:dsi:db:[127.0.0.1] [vjjtbfkfrtit] DB query is: SELECT * FROM ykmaps WHERE keyword = 'username' and value = 'USER@AUTH.LOCAL'


But the ykmap is using lowercase:

Mar 21 18:00:16 yrva361 ykmap[11046]: LOG_DEBUG:ykmap-query:dsi:db:DB query is: SELECT * FROM ykmaps WHERE keyword = 'username' and value = 'user@auth.local'
Mar 21 18:00:16 yrva361 ykmap[11046]: LOG_DEBUG:ykmap-common:SIGN: status=NO_RECORDS_FOUND&0=&t=2013-03-21T18:00:16Z0368 H=yxYLd4z6TztXwU8R/xSuslqNTjM=

P.S.: I'm sending you the logs.

Thanks


Top
 Profile  
Reply with quote  
PostPosted: Mon Mar 25, 2013 12:29 pm 
Offline

Joined: Tue Mar 19, 2013 3:35 pm
Posts: 3
Hi again,

Confirmed, the Bug is not happening if the login and the domain are lowercase ;)


Top
 Profile  
Reply with quote  
PostPosted: Mon Apr 01, 2013 8:18 pm 
Offline

Joined: Mon Apr 01, 2013 6:57 pm
Posts: 2
I'm also seeing this behavior. I'm looking into the LDAP import process to see if either the SQL query or other variable handling part of the process can force the username to lowercase. It'd be nice to know if Yubico has acknowledged this bug and if there is a fix planned. :)


Top
 Profile  
Reply with quote  
PostPosted: Mon Apr 01, 2013 8:41 pm 
Offline

Joined: Mon Apr 01, 2013 6:57 pm
Posts: 2
Okay... I have a "working" solution, at least for me. Pretty simple; just forced the string from the original LDAP search to lowercase. Here are my patches (files located under /usr/share/webmin/yubico-RoP/):

Code:
--- save_user_import_conf.cgi.bak       2013-04-01 19:29:54.000000000 +0000
+++ save_user_import_conf.cgi   2013-04-01 19:30:08.000000000 +0000
@@ -396,7 +396,7 @@
           &webmin_debug_log("import_users_from_ldap", "found user with dn=" . $user->dn);

           $user_name = $user->get_value( 'cn' );
-          $login_name = $user->get_value( $identifier );
+          $login_name = lc($user->get_value( $identifier ));
           if($global_id eq 'objectGUID'){
             $global_name_bin = encode_base64($user->get_value( $global_id ));
             $global_name = trim($global_name_bin);


Code:
--- ykrop2_ldap_user_import.pl.bak      2013-04-01 18:18:05.000000000 +0000
+++ ykrop2_ldap_user_import.pl  2013-04-01 19:25:53.000000000 +0000
@@ -200,7 +200,7 @@
           #&webmin_debug_log("import_users_from_ldap", "found user with dn=" . $user->dn);

           $user_name = $user->get_value( 'cn' );
-          $login_name = $user->get_value( $identifier );
+          $login_name = lc($user->get_value( $identifier ));
           if($global_id eq 'objectGUID'){
             $global_name_bin = encode_base64($user->get_value( $global_id ));
             $global_name = trim($global_name_bin);


I was able to fix what was already in the pgsql database by running the following:

In the ykrop2 database:
Code:
update users set login_name=lower(login_name);


In the ykmap database:
Code:
update ykmaps set value=lower(value);


I'm not suggesting this is a valid fix for everyone, but so far it seems to have done the trick for me. I'm still working on applying the fix to the other sync'ed servers.

(edited to include better details about the fix)


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group