Received: from mail.l3u.de (mail.l3u.de [195.201.147.189]) by gbr-app-1.alpinelinux.org (Postfix) with ESMTPS id D02BB223631 for <~alpine/users@lists.alpinelinux.org>; Wed, 29 May 2024 10:42:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=stonemx.de; s=default; t=1716979375; bh=MqzHCSLVnRN9fFmEJbFhaVTML7fwc0Of5grJh38XIto=; h=From:To:Subject:Date:In-Reply-To:References:From; b=vb08HOKo+7TEMwJQCR0sO0huJ+AWOUXbs8tocWFtxSrgRQjHyg4zXQcBDDpYTcWyf 5TuDRJADESPUALGOsW0qVrKSafHF+wnwJlOqlHtUn8/74pMBL3Xoti+AC9GyurgQdf KhYxKVZZ7I5zulPPB0OBOSId9AgvHCgyYMYDADE8t7oq7iH+BZ6r9MqmTVLBjzDPzf 5tWmuh9LEjI752uQJRY/wR3mHX+1rjAaDd0YlFNW8nHRGUwV9FIzAIHhsVmIGnNIgk shs8znTmxDLfvUwvnharJkchAaoN828tdwRJ+au61sbzhdEmIklStJBWNQjQaIQUGE j5rELPcctyaVg== Received: from ginuog.localnet (p200300e7a7170500a8e730fffe3150ed.dip0.t-ipconnect.de [IPv6:2003:e7:a717:500:a8e7:30ff:fe31:50ed]) by mail.l3u.de (Postfix) with ESMTPSA id AC50CFF083 for <~alpine/users@lists.alpinelinux.org>; Wed, 29 May 2024 12:42:55 +0200 (CEST) From: Tobias Leupold To: ~alpine/users@lists.alpinelinux.org Subject: Re: ash and su/su - Date: Wed, 29 May 2024 12:42:54 +0200 Message-ID: <2369059.BjyWNHgNrj@ginuog> In-Reply-To: <20240527204907.py3IhgpW@steffen%sdaoden.eu> References: <1926392.IobQ9Gjlxr@ginuog> <2207810.C4sosBPzcN@ginuog> <20240527204907.py3IhgpW@steffen%sdaoden.eu> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Hi Steffen! > It all depends on the actual shell. If you have bash, then ensure > ~/.bashrc exists, bash will read it. It's not about bash, but about the default shell (which is BusyBox's ash, no?). I don't get where the prompt after "su" even comes from ... I left the default /etc/profile untouched, which is export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" export PAGER=less umask 022 # use nicer PS1 for bash and busybox ash if [ -n "$BASH_VERSION" -o "$BB_ASH_VERSION" ]; then PS1='\h:\w\$ ' # use nicer PS1 for zsh elif [ -n "$ZSH_VERSION" ]; then PS1='%m:%~%# ' # set up fallback default PS1 else : "${HOSTNAME:=$(hostname)}" PS1='${HOSTNAME%%.*}:$PWD' [ "$(id -u)" -eq 0 ] && PS1="${PS1}# " || PS1="${PS1}\$ " fi for script in /etc/profile.d/*.sh ; do if [ -r "$script" ] ; then . "$script" fi done unset script When I do a plain "su", I get a prompt that would be defied as "\w #". Where is that defined?! It neither matches /etc/profile, nor the PS1 definition in my user's ~/.profile, nor the one in /root/.profile ...