From owner-freebsd-questions@FreeBSD.ORG Sat Jan 18 06:59:43 2014 Return-Path: Delivered-To: freebsd-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 3982C765 for ; Sat, 18 Jan 2014 06:59:43 +0000 (UTC) Received: from relay.mailchannels.net (si-004-i103.relay.mailchannels.net [198.20.121.20]) by mx1.freebsd.org (Postfix) with ESMTP id B5DCB169A for ; Sat, 18 Jan 2014 06:59:40 +0000 (UTC) X-Sender-Id: _forwarded-from|111.125.78.19 Received: from mail-24.name-services.com (ip-10-227-128-69.us-west-2.compute.internal [10.227.128.69]) by relay.mailchannels.net (Postfix) with ESMTPA id 040586161D; Sat, 18 Jan 2014 06:52:44 +0000 (UTC) X-Sender-Id: _forwarded-from|111.125.78.19 Received: from mail-24.name-services.com (mail-24.name-services.com [10.248.1.104]) (using TLSv1 with cipher AES128-SHA) by 0.0.0.0:2500 (trex/5.0.19); Sat, 18 Jan 2014 06:52:45 GMT X-MC-Relay: Forwarding X-MailChannels-SenderId: _forwarded-from%7C111.125.78.19 X-MailChannels-Auth-Id: demandmedia Received: from [192.168.111.121] (UnknownHost [111.125.78.19]) by mail-24.name-services.com with SMTP; Fri, 17 Jan 2014 22:52:39 -0800 Message-ID: <52DA24A4.8010804@a1poweruser.com> Date: Sat, 18 Jan 2014 14:52:20 +0800 From: Fbsd8 User-Agent: Thunderbird 2.0.0.17 (Windows/20080914) MIME-Version: 1.0 To: Polytropon Subject: Re: set prompt for new users References: <52D87D89.1060606@a1poweruser.com> <20140117183438.21f60837.freebsd@edvax.de> In-Reply-To: <20140117183438.21f60837.freebsd@edvax.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: FreeBSD Questions X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Jan 2014 06:59:43 -0000 Polytropon wrote: > On Fri, 17 Jan 2014 08:47:05 +0800, Fbsd8 wrote: >> What file do I place my new 'set prompt' command in so all newly created >> users get it? >> >> I'm running 9.2 and 10.RC4 > > I assume you're talking about the C-Shell. There are two ways: > > To make settings available for all users, set them centrally. > This is /etc/csh.cshrc. > > But also make sure the system settings are not getting overridden > by user settings in ~/.cshrc. When a user is created, he will get > the file /usr/share/skel/dot.cshrc as ~/.cshrc, so you can use > that file as a template for new users. > > Both files mentioned have a section that is tested for interactive > shells. Here you can make your settings, for example to get the > standard traditional full prompt: > > if ($?prompt) then > set promptchars = "%#" > set prompt = "%n@%m:%~%# " > set autolist > # ... more stuff ... > endif > > You can of course add more settings to those files, intended for > interactive and non-interactive shells (for example to set some > environmental variables, even though there is a more elegant way > to do things like that). > > I use pw adduser command to add new users to the host. From the prompt I get when logging on to a new user I see the prompt format used in /usr/share/skel/dot.cshrc. How is /etc/csh.cshrc used to set prompt for all users?