[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

(no subject)

From: root
Subject: (no subject)
Date: Mon, 13 Aug 2001 05:11:47 -0400

>From address@hidden  Fri Feb  9 05:44:52 2001
>Return-Path: <address@hidden>
Received: from (address@hidden [])
        by (8.9.3/8.9.3/Debian 8.9.3-21) with ESMTP id 
        for <address@hidden>; Fri, 9 Feb 2001 05:44:47 +0900
Received: from localhost ([]
        by with esmtp (Exim 3.16 #1 (Debian))
        id 14QxnU-0006e0-00; Thu, 08 Feb 2001 15:36:08 -0500
Received: from ([]
        by with esmtp (Exim 3.16 #1 (Debian))
        id 14Qxmn-0006d4-00
        for <address@hidden>; Thu, 08 Feb 2001 15:35:25 -0500
Received: from localhost 
        by (Smail- 2000-Feb-17 #1; 2000-Feb-24)
        (2413 bytes) via sendmail with 
        id <address@hidden>
        (sender <address@hidden>)
        for address@hidden; Thu, 8 Feb 2001 15:35:24 -0500 (EST)
From: Eric Siegerman <address@hidden>
To: address@hidden
Subject: Re: Force CVS to using root to commit files (one way or another)
Message-ID: <address@hidden>
Mail-Followup-To: address@hidden
References: <address@hidden> <address@hidden>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
User-Agent: Mutt/1.2.5i
In-Reply-To: <address@hidden>; from address@hidden on Thu, Feb 08, 2001 at 
09:57:57AM -0500
Organization: Telepresence Systems Inc.
Sender: address@hidden
Errors-To: address@hidden
X-BeenThere: address@hidden
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:address@hidden>
List-Post: <mailto:address@hidden>
List-Subscribe: <>,
List-Id: Announcements and discussions for the CVS version control system 
List-Unsubscribe: <>,
List-Archive: <>
Date: Thu, 8 Feb 2001 15:35:24 -0500
Status: O
Content-Length: 1850
Lines: 61

On Thu, Feb 08, 2001 at 09:57:57AM -0500, Todd Denniston wrote:
> Matthew J Fletcher wrote:
> > - Due to the requirements of our work we need to be operating as root, (this
> > is set in stone, honist),
> [...] the only time you NEED to be root is to "make
> install [...]", assuming you know how to use file
> permissions. 

Technically true.  They may have some broken development process
mandated by some pointy-haired boss, though.  Beyond the scope of
this list...

> > eg,.
> > 
> > #!/bin/bash
> > su matt
> > tkcvs -dir /usr/src/cvssources &
> > exit
> > 
> > but it dont work,.. any ideas ?

No, it wouldn't.  The "su" command starts up a shell that reads
from standard input, which is your terminal, not the script.
When you quit that shell, the script continues (with the "tkcvs"
command) in the old context, ie. as root.

> > 
> Try this:
> #!/bin/bash
> su - matt -c "tkcvs -dir /usr/src/cvssources" 
> exit

Not all variants of "su" take a -c option; depends which flavour
of Unix you're using.  If yours doesn't, try this version, which
supplies the command you want to run as standard input to the
"su" command, and thus to the subshell that it spawns:

        echo "tkcvs -dir /usr/src/cvssources; exit" | su matt

(You almost certainly don't need the "; exit", since the subshell
should exit on its own when it sees end-of-file.  I added it for
completeness, in case bash has been told to ignore end-of-file.)


|  | /\
|-_|/  >   Eric Siegerman, Toronto, Ont.        address@hidden
|  |  /
Interviewer: You've been looking at the stars all your life:
Is there anything in astrology?
Arthur C. Clarke: It's utter nonsense.  But I'm a Sagittarius,
so I'm naturally skeptical.

Info-cvs mailing list

reply via email to

[Prev in Thread] Current Thread [Next in Thread]