Skip site navigation (1)Skip section navigation (2)
Date:      14 Nov 2002 12:56:57 -0800
From:      swear@attbi.com (Gary W. Swearingen)
To:        Johan Hendriks <johan@double-l.nl>
Cc:        doc@freebsd.org
Subject:   Re: su
Message-ID:  <kbadkbg99i.dkb@localhost.localdomain>
In-Reply-To: <1037280915.1183.27.camel@Larissa.double-l.lokaal>
References:  <1037280915.1183.27.camel@Larissa.double-l.lokaal>

next in thread | previous in thread | raw e-mail | index | archive | help

Johan Hendriks <johan@double-l.nl> writes:

> I come from Linux and under Linux you never must do a su without the - 
> Is this the same under FreeBSD or is it a little typo, or something
> else.

In general, it not even the same under Linux!  You can change your shell
startup scripts so "-" is not (usually?) needed.  But you're probably
referring to a just-installed system, for which I don't know the answer.
The answer might depend on what you need to do after starting "su".  You
could try comparing your environment before and after with "printenv".

You should develop a shell startup script scheme suitable to your shell
and to your desires for things such as the need to use "-" (or not) with
"su", and change your scripts to implement it.  The default shell
startup scripts are simple enough that you should be able to change,
test, and fix what breaks.

If you don't already well understand the huge messy startup script
scheme of "bash", you'll find that the scheme of FreeBSD's "sh" (and
that of "pdksh") is much easier to learn well.

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-doc" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?kbadkbg99i.dkb>