Bug 221830 - vncserver service does not load appropriate profile
Summary: vncserver service does not load appropriate profile
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: vnc
Version: 4.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
: ---
Assignee: Adam Tkac
QA Contact: David Lawrence
URL:
Whiteboard:
Depends On: 114139
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-01-08 12:55 UTC by Adam Tkac
Modified: 2013-04-30 23:34 UTC (History)
1 user (show)

Fixed In Version: RHBA-2007-9064
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-01-17 16:58:08 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2007:0030 0 normal SHIPPED_LIVE vnc-server bug fix update 2007-05-01 13:58:32 UTC

Description Adam Tkac 2007-01-08 12:55:58 UTC
+++ This bug was initially created as a clone of Bug #114139 +++

Description of problem:
When starting vncserver automatically on boot 
using /etc/sysconfig/vncservers and the vncserver service, the users' 
profiles are not loaded. As a result, each vncserver session is run 
using root's profile instead.

Version-Release number of selected component (if applicable):
RHEL3 fully up2date as of 22 Jan 04

How reproducible:
Always

Steps to Reproduce:
1. edit /etc/sysconfig/vncservers to add a user:
VNCSERVERS="1:myusername"
2. run "service start vncserver"
3. log in to the vnc server, open a termainal and type env | grep 
PATH.   

Actual results:
Path is missing several entries, including /usr/local/bin

Expected results:
Complete, working path (the same path you would get if you did "su - 
username")


Additional info:
The problem is that the su command in /etc/init.d/vncserver doesn't 
specify the " - " option. Therefore, the user's profile is never 
loaded.

To fix, change:
"su ${USER} -c \"cd ~${USER} ...
to:
"su - ${USER} -c \"cd ~${USER} ...

This is similar to bug 100706 for RH9

-- Additional comment from jkudrnac on 2006-03-23 05:46 EST --
Successfully reproduced.   
Easy-fix, adding to RHEL3 U8 PROPOSED.  

-- Additional comment from pgraner on 2006-04-25 10:21 EST --
Moving to POSTU8 Blocker.

-- Additional comment from atkac on 2006-10-31 06:15 EST --
patch is created, waiting for pm_ack, qa_ack

-- Additional comment from riek on 2006-12-16 13:22 EST --
Considering this to be high priority as it renders vnc unusable. Plus work is
done, low impact and easy to test.

PM ACK

-- Additional comment from rainer.traut on 2007-01-02 09:02 EST --
The same applies to EL4:

initlog $INITLOG_ARGS -c \
            "runuser ${USER} -c \"cd ~${USER} && [ -f .vnc/passwd ] && vncserver
:${DISP} ${VNCUSERARGS}\""

should be:

      initlog $INITLOG_ARGS -c \
            "runuser -l ${USER} -c \"cd ~${USER} && [ -f .vnc/passwd ] &&
vncserver :${DISP} ${VNCUSERARGS}\""

Comment 2 Jay Turner 2007-01-08 13:18:30 UTC
QE ack for RHEL4.5.

Comment 8 Red Hat Bugzilla 2007-01-17 16:58:08 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 the 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/RHBA-2007-9064.html



Note You need to log in before you can comment on or make changes to this bug.