Error in installing samba

Error in installing samba

Post by walt » Sun, 13 Jul 2003 23:25:25





> > Change root's default shell? Why?
> CSH has its problems, and you are somewhat familiar with bash since you
> use Linux, too.  The very first thing I added to NetBSD when I installed
> it was a static-linked bash.  Using the same shell, when it's available,
> in every OS makes things much easier.

> http://www.faqs.org/faqs/unix-faq/shell/csh-whynot/

The BSD's include an account for the user 'toor' by default, for the purpose
of using bash as the superuser:

$head -4 /etc/passwd
# $FreeBSD: src/etc/master.passwd,v 1.34 2003/04/27 05:45:29 imp Exp $
#
root:*:0:0:Charlie &:/root:/bin/csh
toor:*:0:0:Bourne-again Superuser:/root:/usr/local/bin/bash

The default installations don't include bash, so it must be added from
the ports collection and the correct path to bash must be added to the
passwd file before you can actually login to the 'toor' account.

Note that this example is from FreeBSD.  The path to bash in NetBSD is
/usr/pkg/bin/bash, so don't get them confused.

I find the easiest way to modify the /etc/passwd file is with vipw
instead of the arcane syntax for usermod and friends.

DON'T FORGET to change the password for 'toor' afterwards:
#passwd toor

Just typing 'passwd' as root will change root's passwd but NOT
toor's password.  They are two different users as far as login
is concerned.

 
 
 

Error in installing samba

Post by Frederick Bruckm » Mon, 14 Jul 2003 00:35:09






>> > Change root's default shell? Why?

>> CSH has its problems, and you are somewhat familiar with bash since you
>> use Linux, too.  The very first thing I added to NetBSD when I installed
>> it was a static-linked bash.  Using the same shell, when it's available,
>> in every OS makes things much easier.

>> http://www.faqs.org/faqs/unix-faq/shell/csh-whynot/

> The BSD's include an account for the user 'toor' by default, for the purpose
> of using bash as the superuser:

One of the first things I do when I install a new system is delete
"toor", and change root's shell to "/bin/ksh". "csh" as root's default
shell, and the "toor" account, are kept around mainly for hysterical
raisons. I venture to say, hardly anyone really uses either (for long).

Note that "root's default shell" is only the shell that root logins
get "by default". The "system default shell", the shell that scripts
without a "#!" get (pronouced she-bang), is always "/bin/sh". That's
why there's no consequence to changing root's shell.

Quote:> The default installations don't include bash, so it must be added from
> the ports collection and the correct path to bash must be added to the
> passwd file before you can actually login to the 'toor' account.

"ksh", which is really "pdksh", supports most of your bash-isms, but
has none of the dead weight or weird problems (libtool, e.g.  fails
frequently with "bash" for CONFIG_SHELL), plus it's already installed.

Quote:> Just typing 'passwd' as root will change root's passwd but NOT
> toor's password.  They are two different users as far as login
> is concerned.

But they have the same userid, so they really are the same user.
Plus, you give potential invaders two chances to guess a password
to gain root. I suspect the historical reason that root was given
two logins, was so that if you did something stupid in your shell
startup scripts (such as end with an "exec ..."), you could still
get in to fix it. But today we have "su -m", plus an option to
the boot prompt(s) to boot to single-user and specify a shell,
so I think that two root logins is one too many.

--
Frederick

 
 
 

Error in installing samba

Post by walt » Mon, 14 Jul 2003 08:01:05



> "ksh", which is really "pdksh", supports most of your bash-isms, but
> has none of the dead weight or weird problems...

Is there a way to turn on command-line history in ksh?  That's one of
the two bash thingies that I actually use.

Quote:> ..today we have "su -m"...

I just read the man page on su and the section on -m left me with
drool on my chin.  It just doesn't compute.  What do YOU use su -m
for?  Why might I want to use it?
 
 
 

Error in installing samba

Post by Frederick Bruckm » Mon, 14 Jul 2003 12:06:46





>> "ksh", which is really "pdksh", supports most of your bash-isms, but
>> has none of the dead weight or weird problems...

> Is there a way to turn on command-line history in ksh?  That's one of
> the two bash thingies that I actually use.

It's on all the time if the shell is interactive. To get command *recall*,
use "set -o vi" (ESC k) or "set -o emacs" (CTL-P, or UP-ARROW). The fact
that the up-arrow just works in "csh" and "tcsh", by the way, is probably
the number one reason given for their continued existence.

Quote:>> ..today we have "su -m"...

> I just read the man page on su and the section on -m left me with
> drool on my chin.  It just doesn't compute.  What do YOU use su -m
> for?  Why might I want to use it?

To gain root when you need it? You keep your environment and current
working directory, so if say, you export CFLAGS and LDFLAGS and do a
"make", you only need to "su -m" before running "make install".

As a matter of fact, I have this shell function...

su ()
{

            command su -m ;             \
        else                            \

        fi" ;

Quote:}

so that "-m" becomes the default behavior of "su" with no options. [I'm
looking at this now, and I surely don't remember what the "eval" is for,
so don't ask.]

The other chief advantage of "su -m" is that you don't have to set up
root's default shell or startup scripts at all, as you can simply inherit
them from the login user's environment, but in fact, I do keep nearly the
same setup for root as for my user, just to keep it simple.

--
Frederick

 
 
 

Error in installing samba

Post by David Lo » Tue, 15 Jul 2003 07:26:22


On Wednesday, in article


Quote:> Either the computer overheated and crashed, or ran out of swap and
> crashed, or had too many locked pages and crashed. In any case, in
> order to effectively run NetBSD with only 16mb, you'll want to make
> a kernel that's as small as possible --at least try GENERIC_TINY --
> and make sure you have plenty of swap. I suggest at least ~200mb.

Are there any figures that relate swap size to the 'memory overhead'
of swap space?

I have a couple of pcs 486dlc33 and 486dx66 running NetBSD 1.6 in
8 MB ram. I have only 16 MB swap activated although there are 32 MB
and 48 MB swap partitions available on each. I've found 16 MB swap
gives a more stable and responsive system under normal load as
firewalls whilst with 48 MB swapsize the amount of swap used tends
to grow out of proportion to the load. When first setup, on NetBSD
1.5.2, I had no spare fast pc running NetBSD so tried compiling
smaller kernels on the 486dx66. Compile seemed to run out of memory
with only 16 MB swap and ran out of swap space with 48 MB whilst
completing over best part of a day in 32 MB swap.

David

--