Bug 696679

Summary: Subscription-manager command displays “command not found “ for non root user
Product: Red Hat Enterprise Linux 5 Reporter: spandey
Component: subscription-managerAssignee: Adrian Likins <alikins>
Status: CLOSED ERRATA QA Contact: J.C. Molet <jmolet>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 5.7CC: alikins, cduryee, jmolet, jsefler, kbanerje
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-07-21 08:45:15 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 675214    
Attachments:
Description Flags
working non root user none

Description spandey 2011-04-14 15:40:41 UTC
Description of problem:


Version-Release number of selected component (if applicable):


How reproducible:
2/2

Prerequisites :
Rhel 5.7 with latest subscription manager 

Steps to repro:
Login to client with non root user .
execute “subscription-manager” command at console .

Expected Result : 
Proper following message should display 
“ERROR: must be root to execute “

Actual Result : 
[sach@dhcp193-93 ~]$ subscription-manager
-bash: subscription-manager: command not found

Comment 1 Chris Duryee 2011-04-14 16:26:41 UTC
/usr/sbin isn't on the non-root user's path in 5.7, need to investigate best way to make this work (if at all)

Comment 2 Adrian Likins 2011-04-14 17:26:43 UTC
need to add a link to console helper and a subscription-manager-file in /etc/security/console.apps/

Comment 3 Adrian Likins 2011-04-18 13:16:25 UTC
commit 8d3306fbae05ce6c5394193c48e21d51ad957d76
Author: Adrian Likins <alikins>
Date:   Thu Apr 14 13:45:56 2011 -0400

    696679: add pam/consolehelper links for subscription-manager

Comment 4 J.C. Molet 2011-04-28 14:57:51 UTC
Created attachment 495561 [details]
working non root user

This is verified as working with both the gui pop up and cli:

subscription-manager-0.95.5.8-1.git.6.42d8706.el5
subscription-manager-firstboot-0.95.5.8-1.git.6.42d8706.el5
subscription-manager-gnome-0.95.5.8-1.git.6.42d8706.el5


[jmolet@xanadu ~]$ ssh testuser.redhat.com
testuser.redhat.com's password: 
Last login: Thu Apr 28 10:46:13 2011
[testuser@jmolet-57server ~]$ subscription-manager
You are attempting to run "subscription-manager" which requires administrative
privileges, but more information is needed in order to do so.
Password for root: 

Usage: subscription-manager [options] MODULENAME --help

Supported modules:


	activate       activate the registered user to a specified product
	clean          removes all local consumer data, does not effect the server
	facts          show information for facts
	identity       request a new identity certficate for this machine
	list           list available or consumer subscriptions for registered user
	refresh        pulls the latest entitlement data from the server
	register       register the client to RHN
	subscribe      subscribe the registered machine to a specified product
	unregister     unregister the client from RHN
	unsubscribe    unsubscribe the registered user from all or specific subscriptions
[testuser@jmolet-57server ~]$ which subscription-manager
/usr/bin/subscription-manager
[testuser@jmolet-57server ~]$ which subscription-manager-gui
/usr/bin/subscription-manager-gui


(see screenshot for gui results)

Comment 5 J.C. Molet 2011-04-28 14:58:23 UTC
Marking VERIFIED

Comment 6 errata-xmlrpc 2011-07-21 08:45:15 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHEA-2011-1078.html

Comment 7 errata-xmlrpc 2011-07-21 12:30:09 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHEA-2011-1078.html