From 1ba504b8966b69fae818621fb9d1e96220349c40 Mon Sep 17 00:00:00 2001 From: Michael Prokop Date: Mon, 11 Feb 2008 18:01:19 +0100 Subject: [PATCH] zshrc: use sudo su for alias su --- debian/changelog | 5 ++++- etc/zsh/zshrc | 8 ++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/debian/changelog b/debian/changelog index cae1f33..f99ea58 100644 --- a/debian/changelog +++ b/debian/changelog @@ -9,8 +9,11 @@ grml-etc-core (0.3.48) unstable; urgency=low [ Michael Prokop ] * zshrc: enable 'setopt longlistjobs' by default + * zshrc: re-enable use of 'sudo su' instead of 'sudo -s' for alias su, + otherwise it breaks "su - $USER". Thanks for bringing this up, + Martin Yazdzik! - -- Michael Prokop Fri, 01 Feb 2008 02:52:14 +0100 + -- Michael Prokop Mon, 11 Feb 2008 17:58:42 +0100 grml-etc-core (0.3.47) unstable; urgency=low diff --git a/etc/zsh/zshrc b/etc/zsh/zshrc index 42de4c4..47c7944 100644 --- a/etc/zsh/zshrc +++ b/etc/zsh/zshrc @@ -3,7 +3,7 @@ # Authors: grml-team (grml.org), (c) Michael Prokop # Bug-Reports: see http://grml.org/bugs/ # License: This file is licensed under the GPL v2. -# Latest change: Sam Dez 22 19:17:27 CET 2007 [mika] +# Latest change: Mon Feb 11 18:00:55 CET 2008 [mika] ################################################################################ # This file is sourced only for interactive shells. It # should contain commands to set up aliases, functions, @@ -1357,7 +1357,11 @@ if [[ -r /etc/debian_version ]] ; then fi } - isgrmlcd && alias su="sudo -s" # get a root shell + # get a root shell as normal user in live-cd mode: + if isgrmlcd && [[ $UID -ne 0 ]] ; then + alias su="sudo su" + fi + #a1# Take a look at the syslog: \kbd{\$PAGER /var/log/syslog} alias llog="$PAGER /var/log/syslog" # take a look at the syslog #a1# Take a look at the syslog: \kbd{tail -f /var/log/syslog} -- 2.1.4