From owner-freebsd-questions@FreeBSD.ORG Thu Apr 24 18:02:10 2014 Return-Path: Delivered-To: questions@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 63C8D524 for ; Thu, 24 Apr 2014 18:02:10 +0000 (UTC) Received: from mx02.qsc.de (mx02.qsc.de [213.148.130.14]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 025A61A8C for ; Thu, 24 Apr 2014 18:02:09 +0000 (UTC) Received: from r56.edvax.de (port-92-195-108-40.dynamic.qsc.de [92.195.108.40]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx02.qsc.de (Postfix) with ESMTPS id A7254276B3; Thu, 24 Apr 2014 20:02:07 +0200 (CEST) Received: from r56.edvax.de (localhost [127.0.0.1]) by r56.edvax.de (8.14.5/8.14.5) with SMTP id s3OI0w5t002105; Thu, 24 Apr 2014 20:00:58 +0200 (CEST) (envelope-from freebsd@edvax.de) Date: Thu, 24 Apr 2014 20:00:58 +0200 From: Polytropon To: Fbsd8 Subject: Re: 10.0 set prompt for new users has problems Message-Id: <20140424200058.6c4c6cc8.freebsd@edvax.de> In-Reply-To: <5359293C.20501@a1poweruser.com> References: <5359293C.20501@a1poweruser.com> Organization: EDVAX X-Mailer: Sylpheed 3.1.1 (GTK+ 2.24.5; i386-portbld-freebsd8.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: questions X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list Reply-To: Polytropon List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Apr 2014 18:02:10 -0000 On Thu, 24 Apr 2014 11:09:48 -0400, Fbsd8 wrote: > 10.0 host and using pw command to adduser. > pw adduser test -c Test-user -m -g wheel -w yes > > original /etc/csh.cshrc and /usr/share/skel/dot.cshrc files > > When I log into user test the prompt is a single dollar sign. This is not the default prompt for the C shell. It looks like you're running sh or bash. Can you check? Try $ echo $SHELL to see what login shell has been defined. Maybe the pw command did not set csh as the login shell, and you're left with sh as default. > Issuing the ll command i see .cshrc* > Why does this file end with an *? This is because the file has the executable attribute (+x) set. There are other "signifiers" for files and directories. Try the following % setenv LSCOLORS 'ExGxdxdxCxDxDxBxBxegeg' % ls -laFG .cshrc The colors will also reflect the "executable" attribute. Note that this file does _not_ have to be executable, so check /usr/share/skel if the file has _accidentally_ been chmod'ed with +x. When copying the content of the skel/ directory (or subtree), attributes will be kept. > I can edit the as .cshrc* or .cshrc and replace the existing set prompt > statement with set prompt = "# %/ >" then save the file, exit and login > again. The prompt is still a dollar sign. The user's .cshrc file should override any other settings dome at "higher levels" such as /etc/csh.cshrc. Try the following: set promptchars = "%#" set prompt = "%n@%m:%~%# " This should give you the default C shell prompt. If _this_ works, start modifying it according to your preference. You can replace %n with %N on newer C shell versions. > If I issue set prompt = "# %/ >" command from the test user command line > the prompt still doe's not change. Very strange - I have tested this here, it changes the prompt. poly@r56:~% set prompt = "# %/ >" # /home/poly >_ However, when I try this in sh: poly@r56:~% sh $ set prompt = "# %/ >" $ _ This encourages me to think that my initial assumption of you running the "wrong" shell is correct. :-) > I can edit the /usr/share/skel/dot.cshrc replacing the existing set > prompt with the new one, deluser test, adduser test, and still get > dollar sign for the prompt even though I see the wanted prompt statement > in user test home directory .cshrc* file. Add -s csh to your pw adduser command. > Another problem is the alias commands la and lf don't work but the ll > alias does work. Try "which ls ll" to find out what is actually being executed. Example from my (customized) C shell: % which ls ll ls: aliased to ls -FG -D "%Y-%m-%d %H:%M:%S" ll: aliased to ls -laFG -D "%Y-%m-%d %H:%M:%S" Note that I've modified /etc/csh.cshrc to make global settings for all users (prompt, aliases, $LSCOLORS) and almost emptied the /usr/share/skel/dot.cshrc template. Users here are free to add their own settings and replace default things, but most of them are happy. The unhappy ones use bash anyway. :-) -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...