delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/05/12/10:48:19

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Message-ID: <00f501c31895$787f53b0$78d96f83@pomello>
From: "Max Bowsher" <maxb AT ukf DOT net>
To: <Sylvain DOT Ferriol AT imag DOT fr>, <cygwin AT cygwin DOT com>
References: <1052749051 DOT 3ebfacfbf2d0a AT webmail DOT imag DOT fr> <Pine DOT GSO DOT 4 DOT 44 DOT 0305121021020 DOT 393-100000 AT slinky DOT cs DOT nyu DOT edu> <20030512143314 DOT GE23680 AT redhat DOT com> <1052750540 DOT 3ebfb2cc9d549 AT webmail DOT imag DOT fr>
Subject: Re: suggestion for cygutils - usermod (was Re: howto change home path in /etc/passwd)
Date: Mon, 12 May 2003 15:47:54 +0100
MIME-Version: 1.0
X-Priority: 3
X-MSMail-Priority: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165

Sylvain DOT Ferriol AT imag DOT fr wrote:
> Yes , because i don't want to create a shell doing this:
> grep -v $USERNAME /etc/passwd > /etc/passwd

Care! That will leave you with an empty /etc/passwd.
The shell truncates /etc/passwd BEFORE grep reads it.

> mkpasswd -l -u $USERNAME -p $HOME >> /etc/passwd
> 
> sylvain

Max.

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


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