Bug 811196

Summary: Login to Webyast doesn't work for any non-root user, missing /sbin/unix2_chkpwd
Product: [openSUSE] openSUSE 12.3 Reporter: Forgotten User 6hXCJc5h-F <forgotten_6hXCJc5h-F>
Component: WebYaSTAssignee: Vladimir Moravec <vmoravec>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Major    
Priority: P5 - None CC: forgotten_6hXCJc5h-F, forgotten_mowgTs0AN3, franzmach, suse-beta, vmoravec
Version: Final   
Target Milestone: ---   
Hardware: x86-64   
OS: SUSE Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Forgotten User 6hXCJc5h-F 2013-03-23 10:59:03 UTC
User-Agent:       Mozilla/5.0 (X11; Linux x86_64; rv:19.0) Gecko/20100101 Firefox/19.0

Fresh/clean install of openSUSE 12.3 + fresh installation of WebYAST fails at every user login with error: 

This is embarrassing....

We are sorry, but there are some problems.
Problem:

No such file or directory - /sbin/unix2_chkpwd

Reproducible: Always

Steps to Reproduce:
1. install webyast (zypper install webyast*)
2. start webyast
3. try login with non-root user at yourserver.com:4984/accounts/sign_in

Actual Results:  
Login fails with error:

This is embarrassing....

We are sorry, but there are some problems.
Problem:

No such file or directory - /sbin/unix2_chkpwd



Extra details from show details:

/usr/lib64/ruby/1.9.1/open3.rb:202:in `spawn'
/usr/lib64/ruby/1.9.1/open3.rb:202:in `popen_run'
/usr/lib64/ruby/1.9.1/open3.rb:90:in `popen3'
/usr/lib64/ruby/gems/1.9.1/gems/devise_unix2_chkpwd_authenticatable-0.4.1/lib/devise_unix2_chkpwd_authenticatable/model.rb:38:in `unix2_chkpwd'
/usr/lib64/ruby/gems/1.9.1/gems/activesupport-3.2.12/lib/active_support/core_ext/object/try.rb:36:in `try'
/usr/lib64/ruby/gems/1.9.1/gems/devise_unix2_chkpwd_authenticatable-0.4.1/lib/devise_unix2_chkpwd_authenticatable/model.rb:72:in `authenticate_with_unix2_chkpwd'
/usr/lib64/ruby/gems/1.9.1/gems/devise_unix2_chkpwd_authenticatable-0.4.1/lib/devise_unix2_chkpwd_authenticatable/strategy.rb:24:in `authenticate!'
/usr/lib64/ruby/gems/1.9.1/gems/warden-1.2.1/lib/warden/strategies/base.rb:53:in `_run!'
/usr/lib64/ruby/gems/1.9.1/gems/warden-1.2.1/lib/warden/proxy.rb:354:in `block in _run_strategies_for'
/usr/lib64/ruby/gems/1.9.1/gems/warden-1.2.1/lib/warden/proxy.rb:349:in `each'
/usr/lib64/ruby/gems/1.9.1/gems/warden-1.2.1/lib/warden/proxy.rb:349:in `_run_strategies_for'
/usr/lib64/ruby/gems/1.9.1/gems/warden-1.2.1/lib/warden/proxy.rb:319:in `_perform_authentication'
/usr/lib64/ruby/gems/1.9.1/gems/warden-1.2.1/lib/warden/proxy.rb:104:in `authenticate'
/usr/lib64/ruby/gems/1.9.1/gems/devise-2.2.3/lib/devise/controllers/helpers.rb:56:in `current_account'
/srv/www/webyast/app/controllers/sessions_controller.rb:27:in `create'
/usr/lib64/ruby/gems/1.9.1/gems/actionpack-3.2.12/lib/action_controller/metal/implicit_render.rb:4:in `send_action'
/usr/lib64/ruby/gems/1.9.1/gems/actionpack-3.2.12/lib/abstract_controller/base.rb:167:in `process_action'
/usr/lib64/ruby/gems/1.9.1/gems/actionpack-3.2.12/lib/action_controller/metal/rendering.rb:10:in `process_action'
/usr/lib64/ruby/gems/1.9.1/gems/actionpack-3.2.12/lib/abstract_controller/callbacks.rb:18:in `block in process_action'
/usr/lib64/ruby/gems/1.9.1/gems/activesupport-3.2.12/lib/active_support/callbacks.rb:502:in `_run__4275776219621483482__process_action__2235871317140780904__callbacks'
/usr/lib64/ruby/gems/1.9.1/gems/activesupport-3.2.12/lib/active_support/callbacks.rb:405:in `__run_callback'
/usr/lib64/ruby/gems/1.9.1/gems/activesupport-3.2.12/lib/active_support/callbacks.rb:385:in `_run_process_action_callbacks'
/usr/lib64/ruby/gems/1.9.1/gems/activesupport-3.2.12/lib/active_support/callbacks.rb:81:in `run_callbacks'
/usr/lib64/ruby/gems/1.9.1/gems/actionpack-3.2.12/lib/abstract_controller/callbacks.rb:17:in `process_action'
/usr/lib64/ruby/gems/1.9.1/gems/actionpack-3.2.12/lib/action_controller/metal/rescue.rb:29:in `process_action'
/usr/lib64/ruby/gems/1.9.1/gems/actionpack-3.2.12/lib/action_controller/metal/instrumentation.rb:30:in `block in process_action'
/usr/lib64/ruby/gems/1.9.1/gems/activesupport-3.2.12/lib/active_support/notifications.rb:123:in `block in instrument'
/usr/lib64/ruby/gems/1.9.1/gems/activesupport-3.2.12/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/usr/lib64/ruby/gems/1.9.1/gems/activesupport-3.2.12/lib/active_support/notifications.rb:123:in `instrument'
/usr/lib64/ruby/gems/1.9.1/gems/actionpack-3.2.12/lib/action_controller/metal/instrumentation.rb:29:in `process_action'
/usr/lib64/ruby/gems/1.9.1/gems/actionpack-3.2.12/lib/action_controller/metal/params_wrapper.rb:207:in `process_action'
/usr/lib64/ruby/gems/1.9.1/gems/activerecord-3.2.12/lib/active_record/railties/controller_runtime.rb:18:in `process_action'
/usr/lib64/ruby/gems/1.9.1/gems/actionpack-3.2.12/lib/abstract_controller/base.rb:121:in `process'
/usr/lib64/ruby/gems/1.9.1/gems/actionpack-3.2.12/lib/abstract_controller/rendering.rb:45:in `process'
/usr/lib64/ruby/gems/1.9.1/gems/actionpack-3.2.12/lib/action_controller/metal.rb:203:in `dispatch'
/usr/lib64/ruby/gems/1.9.1/gems/actionpack-3.2.12/lib/action_controller/metal/rack_delegation.rb:14:in `dispatch'
/usr/lib64/ruby/gems/1.9.1/gems/actionpack-3.2.12/lib/action_controller/metal.rb:246:in `block in action'
/usr/lib64/ruby/gems/1.9.1/gems/actionpack-3.2.12/lib/action_dispatch/routing/route_set.rb:73:in `call'
/usr/lib64/ruby/gems/1.9.1/gems/actionpack-3.2.12/lib/action_dispatch/routing/route_set.rb:73:in `dispatch'
/usr/lib64/ruby/gems/1.9.1/gems/actionpack-3.2.12/lib/action_dispatch/routing/route_set.rb:36:in `call'
/usr/lib64/ruby/gems/1.9.1/gems/actionpack-3.2.12/lib/action_dispatch/routing/mapper.rb:42:in `call'
/usr/lib64/ruby/gems/1.9.1/gems/journey-1.0.4/lib/journey/router.rb:68:in `block in call'
/usr/lib64/ruby/gems/1.9.1/gems/journey-1.0.4/lib/journey/router.rb:56:in `each'
/usr/lib64/ruby/gems/1.9.1/gems/journey-1.0.4/lib/journey/router.rb:56:in `call'
/usr/lib64/ruby/gems/1.9.1/gems/actionpack-3.2.12/lib/action_dispatch/routing/route_set.rb:601:in `call'
/usr/lib64/ruby/gems/1.9.1/gems/warden-1.2.1/lib/warden/manager.rb:35:in `block in call'
/usr/lib64/ruby/gems/1.9.1/gems/warden-1.2.1/lib/warden/manager.rb:34:in `catch'
/usr/lib64/ruby/gems/1.9.1/gems/warden-1.2.1/lib/warden/manager.rb:34:in `call'
/usr/lib64/ruby/gems/1.9.1/gems/actionpack-3.2.12/lib/action_dispatch/middleware/best_standards_support.rb:17:in `call'
/usr/lib64/ruby/gems/1.9.1/gems/rack-1.4.5/lib/rack/etag.rb:23:in `call'
/usr/lib64/ruby/gems/1.9.1/gems/rack-1.4.5/lib/rack/conditionalget.rb:35:in `call'
/usr/lib64/ruby/gems/1.9.1/gems/actionpack-3.2.12/lib/action_dispatch/middleware/head.rb:14:in `call'
/usr/lib64/ruby/gems/1.9.1/gems/actionpack-3.2.12/lib/action_dispatch/middleware/params_parser.rb:21:in `call'
/usr/lib64/ruby/gems/1.9.1/gems/actionpack-3.2.12/lib/action_dispatch/middleware/flash.rb:242:in `call'
/usr/lib64/ruby/gems/1.9.1/gems/rack-1.4.5/lib/rack/session/abstract/id.rb:210:in `context'
/usr/lib64/ruby/gems/1.9.1/gems/rack-1.4.5/lib/rack/session/abstract/id.rb:205:in `call'
/usr/lib64/ruby/gems/1.9.1/gems/actionpack-3.2.12/lib/action_dispatch/middleware/cookies.rb:341:in `call'
/usr/lib64/ruby/gems/1.9.1/gems/activerecord-3.2.12/lib/active_record/query_cache.rb:64:in `call'
/usr/lib64/ruby/gems/1.9.1/gems/activerecord-3.2.12/lib/active_record/connection_adapters/abstract/connection_pool.rb:479:in `call'
/usr/lib64/ruby/gems/1.9.1/gems/actionpack-3.2.12/lib/action_dispatch/middleware/callbacks.rb:28:in `block in call'
/usr/lib64/ruby/gems/1.9.1/gems/activesupport-3.2.12/lib/active_support/callbacks.rb:405:in `_run__1569776333568701028__call__2484226795259218836__callbacks'
/usr/lib64/ruby/gems/1.9.1/gems/activesupport-3.2.12/lib/active_support/callbacks.rb:405:in `__run_callback'
/usr/lib64/ruby/gems/1.9.1/gems/activesupport-3.2.12/lib/active_support/callbacks.rb:385:in `_run_call_callbacks'
/usr/lib64/ruby/gems/1.9.1/gems/activesupport-3.2.12/lib/active_support/callbacks.rb:81:in `run_callbacks'
/usr/lib64/ruby/gems/1.9.1/gems/actionpack-3.2.12/lib/action_dispatch/middleware/callbacks.rb:27:in `call'
/usr/lib64/ruby/gems/1.9.1/gems/actionpack-3.2.12/lib/action_dispatch/middleware/remote_ip.rb:31:in `call'
/usr/lib64/ruby/gems/1.9.1/gems/actionpack-3.2.12/lib/action_dispatch/middleware/debug_exceptions.rb:16:in `call'
/usr/lib64/ruby/gems/1.9.1/gems/actionpack-3.2.12/lib/action_dispatch/middleware/show_exceptions.rb:56:in `call'
/usr/lib64/ruby/gems/1.9.1/gems/railties-3.2.12/lib/rails/rack/logger.rb:32:in `call_app'
/usr/lib64/ruby/gems/1.9.1/gems/railties-3.2.12/lib/rails/rack/logger.rb:16:in `block in call'
/usr/lib64/ruby/gems/1.9.1/gems/activesupport-3.2.12/lib/active_support/tagged_logging.rb:22:in `tagged'
/usr/lib64/ruby/gems/1.9.1/gems/railties-3.2.12/lib/rails/rack/logger.rb:16:in `call'
/usr/lib64/ruby/gems/1.9.1/gems/actionpack-3.2.12/lib/action_dispatch/middleware/request_id.rb:22:in `call'
/usr/lib64/ruby/gems/1.9.1/gems/rack-1.4.5/lib/rack/methodoverride.rb:21:in `call'
/usr/lib64/ruby/gems/1.9.1/gems/rack-1.4.5/lib/rack/runtime.rb:17:in `call'
/usr/lib64/ruby/gems/1.9.1/gems/activesupport-3.2.12/lib/active_support/cache/strategy/local_cache.rb:72:in `call'
/usr/lib64/ruby/gems/1.9.1/gems/actionpack-3.2.12/lib/action_dispatch/middleware/static.rb:62:in `call'
/usr/lib64/ruby/gems/1.9.1/gems/rack-ssl-1.3.2/lib/rack/ssl.rb:27:in `call'
/usr/lib64/ruby/gems/1.9.1/gems/rack-cache-1.2/lib/rack/cache/context.rb:136:in `forward'
/usr/lib64/ruby/gems/1.9.1/gems/rack-cache-1.2/lib/rack/cache/context.rb:143:in `pass'
/usr/lib64/ruby/gems/1.9.1/gems/rack-cache-1.2/lib/rack/cache/context.rb:155:in `invalidate'
/usr/lib64/ruby/gems/1.9.1/gems/rack-cache-1.2/lib/rack/cache/context.rb:71:in `call!'
/usr/lib64/ruby/gems/1.9.1/gems/rack-cache-1.2/lib/rack/cache/context.rb:51:in `call'
/usr/lib64/ruby/gems/1.9.1/gems/railties-3.2.12/lib/rails/engine.rb:479:in `call'
/usr/lib64/ruby/gems/1.9.1/gems/railties-3.2.12/lib/rails/application.rb:223:in `call'
/usr/lib64/ruby/gems/1.9.1/gems/railties-3.2.12/lib/rails/railtie/configurable.rb:30:in `method_missing'
/usr/lib64/ruby/gems/1.9.1/gems/passenger-3.0.18/lib/phusion_passenger/rack/request_handler.rb:96:in `process_request'
/usr/lib64/ruby/gems/1.9.1/gems/passenger-3.0.18/lib/phusion_passenger/abstract_request_handler.rb:516:in `accept_and_process_next_request'
/usr/lib64/ruby/gems/1.9.1/gems/passenger-3.0.18/lib/phusion_passenger/abstract_request_handler.rb:274:in `main_loop'
/usr/lib64/ruby/gems/1.9.1/gems/passenger-3.0.18/lib/phusion_passenger/rack/application_spawner.rb:206:in `start_request_handler'
/usr/lib64/ruby/gems/1.9.1/gems/passenger-3.0.18/lib/phusion_passenger/rack/application_spawner.rb:79:in `block in spawn_application'
/usr/lib64/ruby/gems/1.9.1/gems/passenger-3.0.18/lib/phusion_passenger/utils.rb:470:in `safe_fork'
/usr/lib64/ruby/gems/1.9.1/gems/passenger-3.0.18/lib/phusion_passenger/rack/application_spawner.rb:64:in `spawn_application'
/usr/lib64/ruby/gems/1.9.1/gems/passenger-3.0.18/lib/phusion_passenger/spawn_manager.rb:264:in `spawn_rack_application'
/usr/lib64/ruby/gems/1.9.1/gems/passenger-3.0.18/lib/phusion_passenger/spawn_manager.rb:137:in `spawn_application'
/usr/lib64/ruby/gems/1.9.1/gems/passenger-3.0.18/lib/phusion_passenger/spawn_manager.rb:275:in `handle_spawn_application'
/usr/lib64/ruby/gems/1.9.1/gems/passenger-3.0.18/lib/phusion_passenger/abstract_server.rb:357:in `server_main_loop'
/usr/lib64/ruby/gems/1.9.1/gems/passenger-3.0.18/lib/phusion_passenger/abstract_server.rb:206:in `start_synchronously'
/usr/lib64/ruby/gems/1.9.1/gems/passenger-3.0.18/helper-scripts/passenger-spawn-server:99:in `<main>'

Expected Results:  
Successful login

unix2_chkpwd kind of suggests having something to do with package 'rubygem-devise_unix2_chkpwd_authenticatable' and this does get installed together with webyast.
Comment 1 Forgotten User 6hXCJc5h-F 2013-03-23 11:00:52 UTC
Oh, and login doesn't work for root either.
Comment 2 Franz Mach 2013-04-01 19:55:55 UTC
I have the same problem,

WebYast installed on OpenSUSE 12.3 x86_64, tried to access it from a openSUSE 12.2 client with Firefox 19 and Opera 12.14 -same result:
>>
This is embarrassing....

Lo sentimos, pero se han producido algunos problemas.
Problema:

No such file or directory - /sbin/unix2_chkpwd

Por favor, informe del error para que podamos resolver el problema. Report a bug in bugzilla. 
<<
Comment 3 Christian Boltz 2013-04-01 22:33:56 UTC
zypper in pam-modules   should fix it.

This also means that a dependency on pam-modules should be added to the webyast package ;-)
Comment 4 Franz Mach 2013-04-02 09:26:52 UTC
Ok, after installing pam-modules the login works.
However I can't do anything else because appearently there are more dependencies missing, now I get a
"No such file or directory - /var/lib/polkit-1/"
Comment 5 Franz Mach 2013-04-02 09:40:07 UTC
Polkit was actually already installed but the directory is named /var/lib/polkit and not /var/lib/polkit-1 which webyast requires.
I created a symlink to polkit-1 and seems to work so far.
Comment 6 Vladimir Moravec 2013-04-16 13:00:21 UTC
*** Bug 809243 has been marked as a duplicate of this bug. ***
Comment 7 Vladimir Moravec 2013-04-17 10:25:27 UTC
(In reply to comment #5)
> Polkit was actually already installed but the directory is named
> /var/lib/polkit and not /var/lib/polkit-1 which webyast requires.
> I created a symlink to polkit-1 and seems to work so far.

There is a known issue with the current webyast polkit rules which are not compatible with the recent polkit release (permissions must be written in javascript); for updates see this bnc#810336.

I tested the symlink workaround with a fresh openSuse-12.3 studio appliance for the root, and it does not work for me with no or several modules installed; I was only able to sign in, however no further action was allowed, got just this error message:  You have no permissions to see or change the modules, please contact the administrator to set up permissions first! The symlink workaround is not reliable and i'm wondering it is working for you.

However, I'm going to push fix for the missing dependency on pam-modules package, will put update here.
Comment 8 Vladimir Moravec 2013-04-17 10:48:42 UTC
Fix ready in https://github.com/webyast/webyast/pull/89
Comment 9 Vladimir Moravec 2013-10-14 12:20:43 UTC
Fixed in the last webyast update.