Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , 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: <3EC8AE5A.4090907@imag.fr> Date: Mon, 19 May 2003 12:13:46 +0200 From: sferriol User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20021226 Debian/1.2.1-9 X-Accept-Language: fr-fr MIME-Version: 1.0 To: cygwin Subject: script to change home path in /etc/passwd Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit hello i see that ssh read /etc/passwd for searching keys and other files. i've made a little script to change the home path in /etc/passwd it's not perfect and may be need improvements. #!/bin/bash OS=`uname -o` # in cygwin case if [ ${OS} == "Cygwin" ]; then /bin/cp -p /etc/passwd /etc/passwd-bak-tmp && /bin/grep -v ${USERNAME} /etc/passwd-bak-tmp > /etc/passwd && mkpasswd -l -u ${USERNAME} -p ${HOME} > /etc/passwd-bak-tmp && /bin/sed -e "s/\/${USERNAME}:/:/" /etc/passwd-bak-tmp >> /etc/passwd && /bin/rm -f /etc/passwd-bak-tmp fi Sylvain -- 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/