zsh-users
 help / color / mirror / code / Atom feed
* Re: zsh as root login
       [not found] <5lu3gbh6vp.fsf@tequila.systemsz.cs.yale.edu>
@ 1997-08-28  6:16 ` Geoff Wing
  0 siblings, 0 replies; 15+ messages in thread
From: Geoff Wing @ 1997-08-28  6:16 UTC (permalink / raw)
  To: zsh-users

Stefan Monnier <monnier+lists/zsh/workers/news/@TEQUILA.SYSTEMSZ.CS.YALE.EDU> typed:
:Bruce Stephens <B.Stephens@isode.com> writes:
:PPS: furthermore, if you install zsh in /bin, then why do you also want it in
:    /usr/local ? Just "configure --prefix=/ --mandir=/usr/man" and then add
:    a "ln -s /bin/zsh /usr/local/bin/" for those scripts using the
:    "canonic path" (it's always a bad idea to have two copies of the same
:    program since it tends to waste memory by having multiple copies of the
:    same program in core).

That's true and it's important.  If you're using static and dynamic linked
zshs you won't be sharing the text segments between them, so you're better
off only having static linked zsh or dynamic linked zsh, rather than both.
-- 
Geoff Wing [mason@primenet.com.au]                   Phone    : +61-3-9818 2977 
 Technical Manager: PrimeNet Computer Consultants    Facsimile: +61-3-9768 2909
 Web: <URL:http://www.primenet.com.au/>              Mobile   : 0412 162 441
        [ Boulderdash: <URL:http://ciips.ee.uwa.edu.au/~williams/bd/> ]


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: zsh as root login
  1997-08-27 23:20       ` Tim Writer
  1997-08-28  1:58         ` Jason R Mastaler
  1997-08-28  7:15         ` Marc Baudoin
@ 1997-08-29  5:40         ` Duncan Sargeant
  2 siblings, 0 replies; 15+ messages in thread
From: Duncan Sargeant @ 1997-08-29  5:40 UTC (permalink / raw)
  To: zsh-users

Tim Writer wrote on Wed August 27, at 19:20 -0400:
> I prefer to keep root dead simple, using /bin/sh without evan a
> .profile.  In an emergency, I can (almost) always login as root.  For
> day to day administration, I have a second root account (uid 0 but a
> different login name) which has zsh and a full set of startup files as
> its login shell.

That's sort of what I like to do to.  I export ZDOTDIR in my user
shell, and use this function for su: 
function su {
  command su ${*:--c zsh}
}

It gives my a nice root shell when I su, without annoying the rest
of wheel with the extra uid 0 account.  It may not suit your needs
depending on how paranoid you are with your regular zsh configuration,
and how paranoid you want to be as root ;-)

cheers
,dunc
-- 
Duncan Sargeant  -  metacitizen  -  http://www.ucc.gu.uwa.edu.au/~dunc/


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: zsh as root login
  1997-08-28  7:15         ` Marc Baudoin
@ 1997-08-29  2:17           ` Tim Writer
  0 siblings, 0 replies; 15+ messages in thread
From: Tim Writer @ 1997-08-29  2:17 UTC (permalink / raw)
  To: Marc Baudoin; +Cc: Bruce Stephens, zsh-users

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1772 bytes --]

Marc Baudoin <Marc.Baudoin@solsoft.com> writes:

> Tim Writer <Tim.Writer@ftlsol.com> écrit :
> > 
> > Agreed.  But I'm curious as to why you (Marc Baudoin) even want zsh
> > statically linked.
> 
> Just to be able to log in as root while my computer in booted
> single user, as only / is mounted and root's shell is zsh.

How often are you running single user?  If the system is so badly hosed that
you can't get it to go multi-user, having zsh doesn't help much.

> > I prefer to keep root dead simple, using /bin/sh without evan a
> > .profile.
> 
> Why?  When you're logged as root, you also use ed instead of vi
> to keep it simple? :-)

ed? I use cat. :-)

But seriously, you didn't read what I said.  I keep "root" simple for
emergencies.  That is, to make sure I can login in an emergency.  I have a
pretty fancy set of zsh startup scripts and I don't want a stupid mistake or
an oversite to shut me out of root.  An alternate root account with a
different login name and zsh gives me the best of both worlds: safety and
functionality.

> As I manage a lot of machines remotely, I like to have a good
> shell for root (who still uses sh without beeing bothered?) and I
> don't want to have many uid 0 accounts.  So root's shell is zsh
> and it needs to be static so I can log in where I'm in front of
> the computer and it's booted single user.

I manage a lot of machines remotely too and I also like having a good shell.
But, I don't mind an extra root account.

However, my main point was: you can have it exactly the way you want it with
a three line script.  Trying to make configure be all things to all people
seems unwise.

Tim

-- 
Tim Writer                                              Tim.Writer@ftlsol.com
FTL Solutions Inc.
Toronto, Ontario, CANADA


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: zsh as root login
  1997-08-27 23:20       ` Tim Writer
  1997-08-28  1:58         ` Jason R Mastaler
@ 1997-08-28  7:15         ` Marc Baudoin
  1997-08-29  2:17           ` Tim Writer
  1997-08-29  5:40         ` Duncan Sargeant
  2 siblings, 1 reply; 15+ messages in thread
From: Marc Baudoin @ 1997-08-28  7:15 UTC (permalink / raw)
  To: Tim Writer; +Cc: Bruce Stephens, zsh-users

Tim Writer <Tim.Writer@ftlsol.com> écrit :
> 
> Agreed.  But I'm curious as to why you (Marc Baudoin) even want zsh
> statically linked.

Just to be able to log in as root while my computer in booted
single user, as only / is mounted and root's shell is zsh.

> I prefer to keep root dead simple, using /bin/sh without evan a
> .profile.

Why?  When you're logged as root, you also use ed instead of vi
to keep it simple? :-)

As I manage a lot of machines remotely, I like to have a good
shell for root (who still uses sh without beeing bothered?) and I
don't want to have many uid 0 accounts.  So root's shell is zsh
and it needs to be static so I can log in where I'm in front of
the computer and it's booted single user.

-- 
Marc Baudoin   -=-   <Marc.Baudoin@solsoft.com>
Security On-Line software


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: zsh as root login
  1997-08-27 23:20       ` Tim Writer
@ 1997-08-28  1:58         ` Jason R Mastaler
  1997-08-28  7:15         ` Marc Baudoin
  1997-08-29  5:40         ` Duncan Sargeant
  2 siblings, 0 replies; 15+ messages in thread
From: Jason R Mastaler @ 1997-08-28  1:58 UTC (permalink / raw)
  To: zsh-users

Tim Writer <Tim.Writer@ftlsol.com> writes:

> Agreed.  But I'm curious as to why you (Marc Baudoin) even want zsh
> statically linked.  I prefer to keep root dead simple, using /bin/sh without
> evan a .profile.  In an emergency, I can (almost) always login as root.  For
> day to day administration, I have a second root account (uid 0 but a
> different login name) which has zsh and a full set of startup files as its
> login shell.

I agree.  I use zsh, but my root stays /sbin/sh (solaris).  When
logged in as root, I can just invoke zsh on the command line if 
need be.

   Jason R. Mastaler                      jason@mastaler.com


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: zsh as root login
  1997-08-27 10:44     ` Bruce Stephens
@ 1997-08-27 23:20       ` Tim Writer
  1997-08-28  1:58         ` Jason R Mastaler
                           ` (2 more replies)
  0 siblings, 3 replies; 15+ messages in thread
From: Tim Writer @ 1997-08-27 23:20 UTC (permalink / raw)
  To: Bruce Stephens; +Cc: zsh-users

Bruce Stephens <B.Stephens@isode.com> writes:

> Marc.Baudoin@solsoft.com said:
> > That's not what I meant.  Basically, I want to do :
> 
> > ./configure; make; make install
> 
> > and end with a dynamic zsh in /usr/local/bin and a static one in /
> > bin.  The man pages and info files can be installed only one time in /
> > usr/local. 
> 
> Yeah, but how many other people want that?  I think you're better off making 
> and installing it once normally, into /usr/local, and then configuring and 
> building a static version for /bin and installing that by hand.

Agreed.  But I'm curious as to why you (Marc Baudoin) even want zsh
statically linked.  I prefer to keep root dead simple, using /bin/sh without
evan a .profile.  In an emergency, I can (almost) always login as root.  For
day to day administration, I have a second root account (uid 0 but a
different login name) which has zsh and a full set of startup files as its
login shell.

And by the way, I install zsh as /bin/zsh, dynamically linked.

What's wrong with:

        ./configure ; make ; make install
        rm Src/zsh
        make LDFLAGS='-static' ; make install bindir='/bin'

One set of object files, dynamic zsh in /usr/local/bin, static zsh in /bin,
and no changes to the zsh distribution.

Tim

-- 
Tim Writer                                              Tim.Writer@ftlsol.com
FTL Solutions Inc.
Toronto, Ontario, CANADA


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: zsh as root login
  1997-08-27 12:51         ` Juergen Christoffel
  1997-08-27 12:55           ` Marc Baudoin
@ 1997-08-27 12:58           ` Andrew Main
  1 sibling, 0 replies; 15+ messages in thread
From: Andrew Main @ 1997-08-27 12:58 UTC (permalink / raw)
  To: Juergen Christoffel; +Cc: Marc.Baudoin, zefram, zsh-users

Juergen Christoffel wrote:
>   Why not decide on the behavior based on an option to configure:
>
>      ./configure --enable-build-static

This would be good.  autoconf can be used to determine which options
are required for a static build.

>That would be nice. But make that ./configure --sbin and install a
>copy under /sbin instead of /bin for those machines who supply an
>/sbin directory.

But it would be bad for such an option to also cause two copies to be
compiled, or change the installation directories.  You can easily add
--bindir=/bin or --bindir=/sbin yourself.

-zefram


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: zsh as root login
  1997-08-27 12:51         ` Juergen Christoffel
@ 1997-08-27 12:55           ` Marc Baudoin
  1997-08-27 12:58           ` Andrew Main
  1 sibling, 0 replies; 15+ messages in thread
From: Marc Baudoin @ 1997-08-27 12:55 UTC (permalink / raw)
  To: Juergen Christoffel; +Cc: zefram, zsh-users

Juergen Christoffel <jc@aeppel.gmd.de> écrit :
>    Date: Wed, 27 Aug 1997 12:15:14 +0200
>    From: Marc Baudoin <Marc.Baudoin@solsoft.com>
> 
>    Why not decide on the behavior based on an option to configure:
> 
>       ./configure --enable-build-static
> 
> That would be nice. But make that ./configure --sbin and install a
> copy under /sbin instead of /bin for those machines who supply an
> /sbin directory.

Then:

   ./configure --enable-static=/sbin

or

   ./configure --enable-static=/bin

and everybody should be happy :-)

-- 
Marc Baudoin   -=-   <Marc.Baudoin@solsoft.com>
Security On-Line software


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: zsh as root login
  1997-08-27 10:15       ` Marc Baudoin
@ 1997-08-27 12:51         ` Juergen Christoffel
  1997-08-27 12:55           ` Marc Baudoin
  1997-08-27 12:58           ` Andrew Main
  0 siblings, 2 replies; 15+ messages in thread
From: Juergen Christoffel @ 1997-08-27 12:51 UTC (permalink / raw)
  To: Marc.Baudoin; +Cc: zefram, zsh-users

   Date: Wed, 27 Aug 1997 12:15:14 +0200
   From: Marc Baudoin <Marc.Baudoin@solsoft.com>

   Why not decide on the behavior based on an option to configure:

      ./configure --enable-build-static

That would be nice. But make that ./configure --sbin and install a
copy under /sbin instead of /bin for those machines who supply an
/sbin directory.

	--jc


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: zsh as root login
  1997-08-27 10:02   ` Marc Baudoin
  1997-08-27 10:09     ` Andrew Main
@ 1997-08-27 10:44     ` Bruce Stephens
  1997-08-27 23:20       ` Tim Writer
  1 sibling, 1 reply; 15+ messages in thread
From: Bruce Stephens @ 1997-08-27 10:44 UTC (permalink / raw)
  To: zsh-users


Marc.Baudoin@solsoft.com said:
> That's not what I meant.  Basically, I want to do :

> ./configure; make; make install

> and end with a dynamic zsh in /usr/local/bin and a static one in /
> bin.  The man pages and info files can be installed only one time in /
> usr/local. 

Yeah, but how many other people want that?  I think you're better off making 
and installing it once normally, into /usr/local, and then configuring and 
building a static version for /bin and installing that by hand.



^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: zsh as root login
  1997-08-27 10:09     ` Andrew Main
@ 1997-08-27 10:15       ` Marc Baudoin
  1997-08-27 12:51         ` Juergen Christoffel
  0 siblings, 1 reply; 15+ messages in thread
From: Marc Baudoin @ 1997-08-27 10:15 UTC (permalink / raw)
  To: Andrew Main; +Cc: zsh-users

Andrew Main <zefram@tao.co.uk> écrit :
> Marc Baudoin wrote:
> >That's not what I meant.  Basically, I want to do :
> >
> >./configure
> >make
> >make install
> >
> >and end with a dynamic zsh in /usr/local/bin and a static one in
> >/bin.
> 
> Whereas I want to execute the same sequence of commands and have /bin
> unchanged.  What's the problem with configuring and building the two
> copies separately?

Because it generates tow times the various .o files although only
the link phase changes (and my computer is quite slow :-)

Why not decide on the behavior based on an option to configure:

   ./configure --enable-build-static

compiles also a static version and installs it in /bin, whereas

   ./configure

retains the actual behavior?

-- 
Marc Baudoin   -=-   <Marc.Baudoin@solsoft.com>
Security On-Line software


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: zsh as root login
  1997-08-27 10:02   ` Marc Baudoin
@ 1997-08-27 10:09     ` Andrew Main
  1997-08-27 10:15       ` Marc Baudoin
  1997-08-27 10:44     ` Bruce Stephens
  1 sibling, 1 reply; 15+ messages in thread
From: Andrew Main @ 1997-08-27 10:09 UTC (permalink / raw)
  To: Marc Baudoin; +Cc: zefram, zsh-users

Marc Baudoin wrote:
>That's not what I meant.  Basically, I want to do :
>
>./configure
>make
>make install
>
>and end with a dynamic zsh in /usr/local/bin and a static one in
>/bin.

Whereas I want to execute the same sequence of commands and have /bin
unchanged.  What's the problem with configuring and building the two
copies separately?

-zefram


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: zsh as root login
  1997-08-27  9:59 ` Andrew Main
@ 1997-08-27 10:02   ` Marc Baudoin
  1997-08-27 10:09     ` Andrew Main
  1997-08-27 10:44     ` Bruce Stephens
  0 siblings, 2 replies; 15+ messages in thread
From: Marc Baudoin @ 1997-08-27 10:02 UTC (permalink / raw)
  To: Andrew Main; +Cc: zsh-users

Andrew Main <zefram@tao.co.uk> écrit :
> Marc Baudoin wrote:
> >I'd like to have root use zsh on my system.  In order to do it
> >properly, it needs to be installed in /bin and to be compiled
> >statically.  But zsh installs itself in /usr/local/bin and is
> >compiled dynamically (which is OK for normal users but not for
> >root).
> 
> LDFLAGS='-static -s' ./configure --prefix=/ --mandir=/usr/man

That's not what I meant.  Basically, I want to do :

./configure
make
make install

and end with a dynamic zsh in /usr/local/bin and a static one in
/bin.  The man pages and info files can be installed only one
time in /usr/local.

-- 
Marc Baudoin   -=-   <Marc.Baudoin@solsoft.com>
Security On-Line software


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: zsh as root login
  1997-08-27  9:40 Marc Baudoin
@ 1997-08-27  9:59 ` Andrew Main
  1997-08-27 10:02   ` Marc Baudoin
  0 siblings, 1 reply; 15+ messages in thread
From: Andrew Main @ 1997-08-27  9:59 UTC (permalink / raw)
  To: Marc Baudoin; +Cc: zsh-users

Marc Baudoin wrote:
>I'd like to have root use zsh on my system.  In order to do it
>properly, it needs to be installed in /bin and to be compiled
>statically.  But zsh installs itself in /usr/local/bin and is
>compiled dynamically (which is OK for normal users but not for
>root).

LDFLAGS='-static -s' ./configure --prefix=/ --mandir=/usr/man

-zefram


^ permalink raw reply	[flat|nested] 15+ messages in thread

* zsh as root login
@ 1997-08-27  9:40 Marc Baudoin
  1997-08-27  9:59 ` Andrew Main
  0 siblings, 1 reply; 15+ messages in thread
From: Marc Baudoin @ 1997-08-27  9:40 UTC (permalink / raw)
  To: zsh-users

Hi,

I'd like to have root use zsh on my system.  In order to do it
properly, it needs to be installed in /bin and to be compiled
statically.  But zsh installs itself in /usr/local/bin and is
compiled dynamically (which is OK for normal users but not for
root).

So I modified the Makefile to compile a static version of zsh and
install it in /bin in addition to the dynamic version in
/usr/local/bin and I think it would be great if the next version
of zsh would provide such a thing without people having to hack
the code.  Besides the directory in which to install the program,
the only difference is a -static flag (for gcc) added to the link
phase of the compilation.

Is it wise and can you do it?

Thanks.

-- 
Marc Baudoin   -=-   <Marc.Baudoin@solsoft.com>
Security On-Line software


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~1997-08-29  5:48 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <5lu3gbh6vp.fsf@tequila.systemsz.cs.yale.edu>
1997-08-28  6:16 ` zsh as root login Geoff Wing
1997-08-27  9:40 Marc Baudoin
1997-08-27  9:59 ` Andrew Main
1997-08-27 10:02   ` Marc Baudoin
1997-08-27 10:09     ` Andrew Main
1997-08-27 10:15       ` Marc Baudoin
1997-08-27 12:51         ` Juergen Christoffel
1997-08-27 12:55           ` Marc Baudoin
1997-08-27 12:58           ` Andrew Main
1997-08-27 10:44     ` Bruce Stephens
1997-08-27 23:20       ` Tim Writer
1997-08-28  1:58         ` Jason R Mastaler
1997-08-28  7:15         ` Marc Baudoin
1997-08-29  2:17           ` Tim Writer
1997-08-29  5:40         ` Duncan Sargeant

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).