Bug 171736

Summary: kadischi won't build using sudo account
Product: [Fedora] Fedora Reporter: Luya Tshimbalanga <luya256>
Component: kadischiAssignee: Chitlesh GOORAH <chitlesh>
Status: CLOSED NOTABUG QA Contact: Darko Ilic <darko.ilic>
Severity: medium Docs Contact:
Priority: medium    
Version: 4   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
URL: http://www.redhat.com/archives/fedora-livecd-list/2005-October/msg00066.html
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-05-29 16:58:52 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
patch that fixed path none

Description Luya Tshimbalanga 2005-10-25 18:46:06 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8b5) Gecko/20051008 Fedora/1.5-0.5.0.beta2 Firefox/1.4.1

Description of problem:
This scenario applied when an users use kadischi with sudo account causing
problem with commands that require root privilege. For example, anaconda command 
will fail if sudo users tries to use it. The correct path should be /usr/sbin/chroot instead.

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


How reproducible:
Always

Steps to Reproduce:
1. Use kadischi with sudo account
2.
3.
  

Actual Results:  Error generated by commands such as chroot

Expected Results:  kadisci should build livecd with sudo privilege

Additional info:

A complete generated codes:

$ sudo kadischi http://fedora.mirrored.ca/fedora/4/i386/os/ /tmp/livecd/fedora-live.iso
Password:
Sorry, try again.
Password:
Starting kadischi...
Parsing command line arguments
Checking UID
Using buildstamp file /etc/kadischi/buildstamp.
Product path set to Fedora.
Now we are going to try to validate your repository (for now, only http, ftp and local repositories can be checked)
URL http://fedora.mirrored.ca/fedora/4/i386/os contacted. OK
URL http://fedora.mirrored.ca/fedora/4/i386/os/Fedora contacted. OK
URL http://fedora.mirrored.ca/fedora/4/i386/os/Fedora/base contacted. OK
URL http://fedora.mirrored.ca/fedora/4/i386/os/Fedora/RPMS contacted. OK
Repository seems to be OK.
Checking required packages
Looking for config file
Loadnig config file options

  ***  running anaconda  ***

* Display mode = t
* Method = http://fedora.mirrored.ca/fedora/4/i386/os
Probing for video card:   NVIDIA GeForce FX (generic)
Probing for monitor type:   L1730S
Probing for mouse type:   Skipped mouse probe.
* anaconda floppy device fd0

  ***  anaconda has finished the job ***

running post installation scripts
/usr/local/share/kadischi/post_install_scripts/01umountproc.sh
/usr/local/share/kadischi/post_install_scripts/02install.sh
/usr/local/share/kadischi/post_install_scripts/03fstab.py
/usr/local/share/kadischi/post_install_scripts/04auth.sh
/usr/local/share/kadischi/post_install_scripts/04auth.sh: line 3: chroot: command not found
/usr/local/share/kadischi/post_install_scripts/04auth.sh: line 5: chroot: command not found
/usr/local/share/kadischi/post_install_scripts/04auth.sh: line 7: chroot: command not found

  ***  Fatal error: /usr/local/share/kadischi/post_install_scripts/04auth.sh returned non zero (32512) exit code. Aborting execution.

Cleaning up temporary files...

Traceback (most recent call last):
  File "/usr/local/share/kadischi/kadischi.py", line 248, in ?
    run ("%s %s" % (script, sysdir), builddir)
  File "/usr/local/share/kadischi/lib/functions.py", line 115, in run
    cleanup (builddir)
  File "/usr/local/share/kadischi/lib/functions.py", line 107, in cleanup
    clean_directory (builddir)
  File "/usr/local/share/kadischi/lib/functions.py", line 83, in clean_directory    keep_child_directories)
  File "/usr/local/share/kadischi/lib/functions.py", line 83, in clean_directory    keep_child_directories)
  File "/usr/local/share/kadischi/lib/functions.py", line 83, in clean_directory    keep_child_directories)
  File "/usr/local/share/kadischi/lib/functions.py", line 80, in clean_directory    if os.path.isdir (path) and not os.path.islink (path):
  File "/usr/lib/python2.4/posixpath.py", line 195, in isdir

Comment 1 Luya Tshimbalanga 2005-10-25 19:04:12 UTC
Created attachment 120379 [details]
patch that fixed path

set the correct path for anaconda as /usr/sbin/anaconda

Comment 2 Jasper O. Hartline 2005-11-02 19:34:55 UTC
(In reply to comment #1)
> Created an attachment (id=120379) [edit]
> patch that fixed path
> 
> set the correct path for anaconda as /usr/sbin/anaconda

Hello.
I'm stumped.
Thats not a patch file.
Where in the file was /usr/bin/anaconda changed?
Why would /usr/bin/anaconda need to be changed if your kadischi is faiing
looking for chroot? To my knowledge, anaconda != chroot.

Could you elaborate a little further please?

Comment 3 Jasper O. Hartline 2005-11-03 02:06:59 UTC
You might just get away scott free with this one, by first exporting a root-like
$PATH, since sudo does not inherit root's environment, chroot is not going to be
found. Just a suggestion, try that and see if it works.

e.g. [user@localhost]# export PATH=$PATH:
/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin

The colons, seperate each directory path.


Comment 4 Jasper O. Hartline 2006-01-23 18:45:45 UTC
Could the poster of comment #1 repost with a patch file included.
Surely we can get this stuff into CVS.

Comment 5 Luya Tshimbalanga 2006-05-29 16:58:52 UTC
The patch is practically useless which the current kadischi status. I am closing
this bug report.