Received: from mail.xw3.org (a.xw3.org [5.252.226.107]) by gbr-app-1.alpinelinux.org (Postfix) with ESMTPS id 02EB8223656 for <~alpine/users@lists.alpinelinux.org>; Wed, 29 May 2024 12:00:39 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 6511A94059E for <~alpine/users@lists.alpinelinux.org>; Wed, 29 May 2024 14:00:38 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hanez.org; s=dkim; t=1716984038; h=from:subject:date:message-id:to:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=l8hFTJU4xnzms5ZuJRF0iQP7nyXYeHbbFcuICa0dC3M=; b=UQJjm03DSIQaKfx8CLw5K8kiexzTQbTCc4Pfb1uu61EDwxdR9b4I2srFN873qdnnmNd0ZV VcLsa7fatsok7jdpUi7FzyJRqpvnXrsGYQRiT7BofqH/rj90tewsepl4170t04Z0SxUQTL yOkBBsN/d1w/vKeIiNm/QmsqPRMoDHOArwk3HCrtgtyo+pIZN3AP+WjTQIXnX2sULKm7zV dFlkv1UIcZbyC71okf7Zqwm1Y3VpKvbxFfj4VRBpaZOYYoa3/wqrxQh94RHlTK5EmejPc/ mIQ721ZHFUMyJfzRE5St9zxuBiC7akjs1Ik3C9xVEyCr4YKvk4PH9SWe2f8nig== Date: Wed, 29 May 2024 14:00:37 +0200 From: Johannes Findeisen To: ~alpine/users@lists.alpinelinux.org Subject: Re: ash and su/su - Message-ID: <20240529140037.23859e04@jupiter> In-Reply-To: <2369059.BjyWNHgNrj@ginuog> References: <1926392.IobQ9Gjlxr@ginuog> <2207810.C4sosBPzcN@ginuog> <20240527204907.py3IhgpW@steffen%sdaoden.eu> <2369059.BjyWNHgNrj@ginuog> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Last-TLS-Session-Version: TLSv1.3 Hi Tobias, On Wed, 29 May 2024 12:42:54 +0200 Tobias Leupold wrote: > 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 since I actually do not know the behavior of /bin/ash, I don't know if this helps. As you can read from the "su" man page: -, -l, --login Start the shell as a login shell with an environment similar to a real login. I always do a "su -" to get a real login shell. I believe that when only doing "su" (without the dash), you will get some default where ~/.profile is not being read... I have no system to test it because my Zsh is configured the same way for my user and for the root user on all my systems and maybe the Zsh's behaviour is different. Be sure that I really do not know it, but maybe this helps you a little bit to figure out what is going on... Busybox's ash is very minimal so it can be that there are some features missing... Kind regards, Johannes -- Please do not top post! Answer inline or at the bottom...