delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/05/01/11:37:13

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
X-Apparently-From: <earnie?boyd AT yahoo DOT com>
Message-ID: <3AEED808.F7DCB6A8@yahoo.com>
Date: Tue, 01 May 2001 11:36:40 -0400
From: Earnie Boyd <earnie_boyd AT yahoo DOT com>
Reply-To: Cygwin Users <cygwin AT cygwin DOT com>
X-Mailer: Mozilla 4.76 [en] (WinNT; U)
X-Accept-Language: en
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: Cygwin for Windows Me
References: <002e01c0d24a$83735340$1300a8c0 AT internal DOT sti> <3AEECD6A DOT 54C41C64 AT yahoo DOT com> <004801c0d24e$7f56f060$1300a8c0 AT internal DOT sti> <20010501105601 DOT A6665 AT redhat DOT com> <3AEECF3B DOT 2CC71F78 AT ece DOT gatech DOT edu> <20010501110456 DOT A6812 AT redhat DOT com>

Christopher Faylor wrote:
> 
> On Tue, May 01, 2001 at 10:59:07AM -0400, Charles S. Wilson wrote:
> >Christopher Faylor wrote:
> >>
> >> On Tue, May 01, 2001 at 10:53:34AM -0400, (STi) Michael C. Schatz wrote:
> >> >In that case is there a way for mkpasswd to maintain shell choice?
> >>
> >> mkpasswd
> >> vi /etc/passwd
> >> :%s%/bin/sh%/bin/bash%
> >> ZZ
> >
> >---mymkpasswd----
> >#!/bin/sh
> >mkpasswd
> >cat /etc/passwd | sed -e 's#/bin/sh#/bin/bash#' > /tmp/passwd
> >mv /tmp/passwd /etc/passwd
> >-----------------
> 
> Aha!  Script wars!
> 
> I'll stop here.  You win.
> 

Hmm...  Since it's a war ;), how about

  cat << EOD > /etc/passwd.ex
  %s%/bin/sh%/bin/bash%
  exit
  EOD
  vi -s /etc/passwd.ex -es /etc/passwd
  rm /etc/passwd.ex

Earnie.

_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019