Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 24 Mar 2002 02:36:06 -0500
From:      parv@pair.com
To:        Joe & Fhe Barbish <barbish@a1poweruser.com>
Cc:        FBSDQ <questions@FreeBSD.ORG>
Subject:   Re: command history for user accounts
Message-ID:  <20020324073606.GA7992@moo.holy.cow>
In-Reply-To: <LPBBIGIAAKKEOEJOLEGOGENNCLAA.barbish@a1poweruser.com>
References:  <LPBBIGIAAKKEOEJOLEGOGENNCLAA.barbish@a1poweruser.com>

next in thread | previous in thread | raw e-mail | index | archive | help
in message <LPBBIGIAAKKEOEJOLEGOGENNCLAA.barbish@a1poweruser.com>,
wrote Joe & Fhe Barbish thusly...
>
> My regular users created with adduser do not have any 
> command history like my root has. I am using the default sh shell.
> I have command on the root account.
> 
> Is this normal? 
> 
> How do I turn on command history for regular user accounts? 

i am not clear about the statement "i use default sh shell".  is
that the default shell for new user or for yourself?  if it's for
new user, then, you can ignore this whole post.


command history & its access is shell dependent.  in ksh 'r' is the
command to execute the last-command-in-history when given no
arguments; in bash, it's "!".  even sh has this, but w/o aliases or
man page, it's not easier.

given this /etc/shells...

/bin/sh
/bin/csh
/bin/tcsh
/bin/bash
/usr/local/bin/ksh93
/usr/local/bin/zsh
/usr/local/bin/bash

...adduser lists the following shells, first entry being the
default...

Enter your default shell: bash csh date ksh93 no sh tcsh zsh
[bash]:


...if i didn't have bash, the default shell would be csh (for the
new user).  as i understand it, csh is now tcsh (and tcsh provides
better/easier access to history than plain csh), which is the
default shell for root.

now, if the csh has not been replaced (w/ tcsh) -- or, if bash is
not installed, or if adduser version doesn't sort the shell list --
in your freebsd version, it's quite possible that new users are
assigned csh.  thus, they might not have easy access to history like
you do w/ whatever shell that you are using as root.



what was my point again?


  - parv

-- 
 

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




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