Date: Sat, 18 Jan 2014 14:52:20 +0800 From: Fbsd8 <fbsd8@a1poweruser.com> To: Polytropon <freebsd@edvax.de> Cc: FreeBSD Questions <freebsd-questions@freebsd.org> Subject: Re: set prompt for new users Message-ID: <52DA24A4.8010804@a1poweruser.com> In-Reply-To: <20140117183438.21f60837.freebsd@edvax.de> References: <52D87D89.1060606@a1poweruser.com> <20140117183438.21f60837.freebsd@edvax.de>
next in thread | previous in thread | raw e-mail | index | archive | help
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?
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?52DA24A4.8010804>