10.0 set prompt for new users has problems

Polytropon freebsd at edvax.de
Fri Apr 25 01:10:46 UTC 2014


On Thu, 24 Apr 2014 20:47:44 -0400, Fbsd8 wrote:
> Polytropon wrote:
> > 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.
> >
> 
> All the users I created with the above pw command are sh shell.
> Used vipw and see that the last field at end of the line is /bin/sh

As I guessed, erm, concluded. :-)



> >> 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.
> > 
> >
> This must be the new default in 10.0 because
> ls -laFG /usr/share/skel shows dot.cshrc*   and
> ls -la   /usr/share/skel shows dot.cshrc

The -F option adds the '/', '*', '|', '@', '%' and '='
accordingly, see "man ls" for details. The -G option
enables the colors as defined in $LSCOLORS (or default
colors). Currently I'm not able to run a v10 system
to check if those got new defaults...



> >> 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.
> >
> 
> pw adduser test -c Test-user -m -g wheel -s csh -w yes
> Fixed the problem. Now the changes made to /usr/share/skel/dot.cshrc 
> take affect in the users added using that pw command. The aliases also 
> work now.

This is to be exptected. :-)

For existing users, you can use the chsh command to change
the shell.





-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...


More information about the freebsd-questions mailing list