Re: changing prompt for user in jail
On Mon, 31 Dec 2012 12:29:44 -0500, Fbsd8 wrote: > Aldis Berjoza wrote: > > > > 31.12.2012, 18:26, "Fbsd8" : > > > >> Them I put the set prompt = "# %/ >" statement in the jail's > >> /usr/share/skel/.cshrc and created a different user account > >> using the same pw command, still no joy. > > > > Shouldn't that be /etc/skel/.cshrc ? > > > > Nope, no such directory as /etc/skel as part of base release. It might be a symlink to /usr/share/skel which is the standard location, as described in "man hier": /usr/ contains the majority of user utilities and applications share/ architecture-independent files skel/ example . (dot) files for new accounts -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ... ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: changing prompt for user in jail
On Mon, 31 Dec 2012 11:25:38 -0500, Fbsd8 wrote: > Now when I login to the jail over remote ssh to the just created user > account I get the % prompt, then su to root and get the > set prompt = "# %/ >". > I want that same prompt for all user I create in the jail. Each user you add will have "predefined" dot files copied into his ~ directory. Those are obtained from /usr/share/skel. In order to make global settings available to all users, you have to do two things: 1st: Make sure (e. g. by removing the template or changing its content, commenting out or deleting lines) that they won't receive the "predefined" dot file from the skel/ subdirectory. 2nd: Make your change global in /etc/csh.cshrc. If you want root to participate, make sure /root/.cshrc does not define the following (or similar): set promptchars = "%#" set prompt = "%n@%m:%~%# " This will give you a standard UNIX prompt which will automatically add # for root and % for non-root as prompt character, as well as display the username, the hostname, and the working directory. Similarly to the approach mentioned, you can "globalize" the C shell's login and logout files: /etc/csh.login and /etc/csh.logout vs. ~/.login and ~/.logout (from /usr/share/skel/dot.login and /usr/share/skel/dot.logout). If users wish to override settings, they can do that in their home directory's dot files. > I tried putting the set prompt = "# %/ >" statement in the jail user > account /home/test/.cshrc file log out and back in to no effect. This is strange. Can you interactively change the prompt? > Them I put the set prompt = "# %/ >" statement in the jail's > /usr/share/skel/.cshrc and created a different user account > using the same pw command, still no joy. Maybe there's some relation to global files in /etc? But note: The files in /usr/share/skel have special names! If you want to create .cshrc, the name of the template must be dot.cshrc (literally 'd' 'o' 't' dot cshrc). The templates in this directory should already have this pattern. > Then I just added the set prompt = "# %/ >" statement in the jail's > /etc/csh.cshrc and created new jail user account and still no joy. > > I even tried putting the set prompt = "# %/ >" statement as the last > line in the files so it was out side of any if statements with no joy. If the shells invoked are login shells, you can add commands to the .login files; note that only interactive login shells will read them. > No matter what I do to the config of the jail files it makes no > difference when I use ssh to login to the jail user account. > > Anyone have any idea what I any doing wrong? > > Or is this just now jails work? It should at least work on "normal level". -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ... ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: changing prompt for user in jail
Aldis Berjoza wrote: 31.12.2012, 18:26, "Fbsd8" : Them I put the set prompt = "# %/ >" statement in the jail's /usr/share/skel/.cshrc and created a different user account using the same pw command, still no joy. Shouldn't that be /etc/skel/.cshrc ? Nope, no such directory as /etc/skel as part of base release. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: changing prompt for user in jail
31.12.2012, 18:26, "Fbsd8" : > Them I put the set prompt = "# %/ >" statement in the jail's > /usr/share/skel/.cshrc and created a different user account > using the same pw command, still no joy. Shouldn't that be /etc/skel/.cshrc ? -- Aldis Berjoza FreeBSD addict ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
changing prompt for user in jail
When I change the prompt for root's .cshrc file in the jail it works as expected. if ($?prompt) then # An interactive shell -- set some stuff up set prompt = "# %/ >" set filec set history = 100 set savehist = 100 set mail = (/var/mail/$USER) if ( $?tcsh ) then bindkey "^W" backward-delete-word bindkey -k up history-search-backward bindkey -k down history-search-forward endif endif But when I start the jail and login to the jails host console and issue "pw adduser test -c jail-user -m -g wheel -w yes" the user does get created ok. Now when I login to the jail over remote ssh to the just created user account I get the % prompt, then su to root and get the set prompt = "# %/ >". I want that same prompt for all user I create in the jail. I tried putting the set prompt = "# %/ >" statement in the jail user account /home/test/.cshrc file log out and back in to no effect. Them I put the set prompt = "# %/ >" statement in the jail's /usr/share/skel/.cshrc and created a different user account using the same pw command, still no joy. Then I just added the set prompt = "# %/ >" statement in the jail's /etc/csh.cshrc and created new jail user account and still no joy. I even tried putting the set prompt = "# %/ >" statement as the last line in the files so it was out side of any if statements with no joy. No matter what I do to the config of the jail files it makes no difference when I use ssh to login to the jail user account. Anyone have any idea what I any doing wrong? Or is this just now jails work? Thanks ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: Changing prompt
On Tue, Mar 28, 2006 at 07:24:05AM -0300, Rodrigo G. Tavares de Souza wrote: > Hi, > > How could I show the path on prompt or see colored files when I make a ls > command? > > Best Regards, > Rodrigo Souza > Sao Paulo - Brazil The first depends on the shell used. For example, in bash do: export PS1='\w>' All about prompt is described in bash(1), tcsh(1) and so on. Use ls -G for colored files or set CLICOLOR and CLICOLOR_FORCE environment variables for the same. For example, in bash type: export CLICOLOR= export CLICOLOR_FORCE= All about this is described in ls(1). Best Regards, Elisej Babenko Kiev Ukraine ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Changing prompt
At 12:57 28.03.2006, Glenn Dawson wrote: At 02:29 AM 3/28/2006, Vaaf wrote: At 12:24 28.03.2006, Rodrigo G. Tavares de Souza wrote: Hi, How could I show the path on prompt or see colored files when I make a ls command? Best Regards, Rodrigo Souza Sao Paulo - Brazil ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]" Try to install /usr/ports/shells/zsh, and use this as your /etc/zshrc: ### BEGIN umask 022 alias vi='vim' alias j='jobs -l' alias h='history' alias ls='ls -G' alias cd..='cd ..' alias cd...='cd ../..' alias cd='cd ../../..' alias cd.='cd ../../../..' alias cd..='cd ../../../../..' alias cd/='cd /' alias wf='w -f' alias ws='w -s' alias df='df -h' alias ftp='lftp' alias pfdump='tcpdump -n -e -ttt -r /var/log/pflog' alias pfmonitor='tcpdump -n -e -ttt -i pflog0' alias pfreload='pfctl -F all && pfctl -f /etc/pf.conf' alias pfshow='pfctl -vvsr' autoload -U compinit compinit -C zstyle ':completion:*' completer _complete _prefix zstyle ':completion::prefix-1:*' completer _complete zstyle ':completion:incremental:*' completer _complete _correct zstyle ':completion:predict:*' completer _complete zstyle ':completion::complete:*' use-cache 1 zstyle ':completion::complete:*' cache-path ~/.zsh/cache/$HOST zstyle ':completion:*' expand 'yes' zstyle ':completion:*' squeeze-slashes 'yes' zstyle ':completion::complete:*' '\' zstyle ':completion::complete:*:tar:directories' file-patterns '*~.*(-/)' zstyle ':completion:*:complete:-command-::commands' ignored-patterns '*\~' zstyle ':completion:*:matches' group 'yes' zstyle ':completion:*:options' description 'yes' zstyle ':completion:*:options' auto-description '%d' zstyle ':completion:*:history-words' stop verbose zstyle ':completion:*:history-words' remove-all-dups yes zstyle ':completion:*:history-words' list false zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS} PROMPT=$'%{\e[01;36m%}(%{\e[22;36m%}%n%{\e[01;30m%}@' PROMPT+=$'%{\e[22;36m%}%m%{\e[01;36m%})%{\e[01;36m%}%{\e[01;36m%}(' PROMPT+=$'%{\e[22;36m%}%D{%H:%M}%{\e[01;30m%}+%{\e[22;36m%}%D{%m/%d/%y}' PROMPT+=$'%{\e[01;36m%})%{\e[01;30m\e[00m%}\n%{\e[01;36m%}(' PROMPT+=$'%{\e[22;36m%}%#%{\e[01;30m%}:%{\e[22;36m%}%~%{\e[01;36m%})' PROMPT+=$'%{\e[01;30m\e[00m%} ' if [[ `whoami` = root ]] then PROMPT=$'%{\e[01;31m%}(%{\e[22;31m%}%n%{\e[01;30m%}@' PROMPT+=$'%{\e[22;31m%}%m%{\e[01;31m%})%{\e[01;31m%}%{\e[01;31m%}(' PROMPT+=$'%{\e[22;31m%}%D{%H:%M}%{\e[01;30m%}+%{\e[22;31m%}%D{%m/%d/%y}' PROMPT+=$'%{\e[01;31m%})%{\e[01;30m\e[00m%}\n%{\e[01;31m%}(' PROMPT+=$'%{\e[22;31m%}%#%{\e[01;30m%}:%{\e[22;31m%}%~%{\e[01;31m%})' PROMPT+=$'%{\e[01;30m\e[00m%} ' fi ### END This is truly a beautiful prompt. Yikes. If you're using /bin/csh that comes with FreeBSD, the following will do what you asked about: set prompt="%/ " setenv CLICOLOR For more info, see the prompt variable in the csh(1) man page, and the environment section of the ls(1) man page. -Glenn Enjoy, Vaaf ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]" Yeah but I'm sure Mr Souza appreciates some good design also? -- Vaaf ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Changing prompt
At 02:29 AM 3/28/2006, Vaaf wrote: At 12:24 28.03.2006, Rodrigo G. Tavares de Souza wrote: Hi, How could I show the path on prompt or see colored files when I make a ls command? Best Regards, Rodrigo Souza Sao Paulo - Brazil ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]" Try to install /usr/ports/shells/zsh, and use this as your /etc/zshrc: ### BEGIN umask 022 alias vi='vim' alias j='jobs -l' alias h='history' alias ls='ls -G' alias cd..='cd ..' alias cd...='cd ../..' alias cd='cd ../../..' alias cd.='cd ../../../..' alias cd..='cd ../../../../..' alias cd/='cd /' alias wf='w -f' alias ws='w -s' alias df='df -h' alias ftp='lftp' alias pfdump='tcpdump -n -e -ttt -r /var/log/pflog' alias pfmonitor='tcpdump -n -e -ttt -i pflog0' alias pfreload='pfctl -F all && pfctl -f /etc/pf.conf' alias pfshow='pfctl -vvsr' autoload -U compinit compinit -C zstyle ':completion:*' completer _complete _prefix zstyle ':completion::prefix-1:*' completer _complete zstyle ':completion:incremental:*' completer _complete _correct zstyle ':completion:predict:*' completer _complete zstyle ':completion::complete:*' use-cache 1 zstyle ':completion::complete:*' cache-path ~/.zsh/cache/$HOST zstyle ':completion:*' expand 'yes' zstyle ':completion:*' squeeze-slashes 'yes' zstyle ':completion::complete:*' '\' zstyle ':completion::complete:*:tar:directories' file-patterns '*~.*(-/)' zstyle ':completion:*:complete:-command-::commands' ignored-patterns '*\~' zstyle ':completion:*:matches' group 'yes' zstyle ':completion:*:options' description 'yes' zstyle ':completion:*:options' auto-description '%d' zstyle ':completion:*:history-words' stop verbose zstyle ':completion:*:history-words' remove-all-dups yes zstyle ':completion:*:history-words' list false zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS} PROMPT=$'%{\e[01;36m%}(%{\e[22;36m%}%n%{\e[01;30m%}@' PROMPT+=$'%{\e[22;36m%}%m%{\e[01;36m%})%{\e[01;36m%}%{\e[01;36m%}(' PROMPT+=$'%{\e[22;36m%}%D{%H:%M}%{\e[01;30m%}+%{\e[22;36m%}%D{%m/%d/%y}' PROMPT+=$'%{\e[01;36m%})%{\e[01;30m\e[00m%}\n%{\e[01;36m%}(' PROMPT+=$'%{\e[22;36m%}%#%{\e[01;30m%}:%{\e[22;36m%}%~%{\e[01;36m%})' PROMPT+=$'%{\e[01;30m\e[00m%} ' if [[ `whoami` = root ]] then PROMPT=$'%{\e[01;31m%}(%{\e[22;31m%}%n%{\e[01;30m%}@' PROMPT+=$'%{\e[22;31m%}%m%{\e[01;31m%})%{\e[01;31m%}%{\e[01;31m%}(' PROMPT+=$'%{\e[22;31m%}%D{%H:%M}%{\e[01;30m%}+%{\e[22;31m%}%D{%m/%d/%y}' PROMPT+=$'%{\e[01;31m%})%{\e[01;30m\e[00m%}\n%{\e[01;31m%}(' PROMPT+=$'%{\e[22;31m%}%#%{\e[01;30m%}:%{\e[22;31m%}%~%{\e[01;31m%})' PROMPT+=$'%{\e[01;30m\e[00m%} ' fi ### END This is truly a beautiful prompt. Yikes. If you're using /bin/csh that comes with FreeBSD, the following will do what you asked about: set prompt="%/ " setenv CLICOLOR For more info, see the prompt variable in the csh(1) man page, and the environment section of the ls(1) man page. -Glenn Enjoy, Vaaf ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]" ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Changing prompt
At 12:24 28.03.2006, Rodrigo G. Tavares de Souza wrote: Hi, How could I show the path on prompt or see colored files when I make a ls command? Best Regards, Rodrigo Souza Sao Paulo - Brazil ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]" Try to install /usr/ports/shells/zsh, and use this as your /etc/zshrc: ### BEGIN umask 022 alias vi='vim' alias j='jobs -l' alias h='history' alias ls='ls -G' alias cd..='cd ..' alias cd...='cd ../..' alias cd='cd ../../..' alias cd.='cd ../../../..' alias cd..='cd ../../../../..' alias cd/='cd /' alias wf='w -f' alias ws='w -s' alias df='df -h' alias ftp='lftp' alias pfdump='tcpdump -n -e -ttt -r /var/log/pflog' alias pfmonitor='tcpdump -n -e -ttt -i pflog0' alias pfreload='pfctl -F all && pfctl -f /etc/pf.conf' alias pfshow='pfctl -vvsr' autoload -U compinit compinit -C zstyle ':completion:*' completer _complete _prefix zstyle ':completion::prefix-1:*' completer _complete zstyle ':completion:incremental:*' completer _complete _correct zstyle ':completion:predict:*' completer _complete zstyle ':completion::complete:*' use-cache 1 zstyle ':completion::complete:*' cache-path ~/.zsh/cache/$HOST zstyle ':completion:*' expand 'yes' zstyle ':completion:*' squeeze-slashes 'yes' zstyle ':completion::complete:*' '\' zstyle ':completion::complete:*:tar:directories' file-patterns '*~.*(-/)' zstyle ':completion:*:complete:-command-::commands' ignored-patterns '*\~' zstyle ':completion:*:matches' group 'yes' zstyle ':completion:*:options' description 'yes' zstyle ':completion:*:options' auto-description '%d' zstyle ':completion:*:history-words' stop verbose zstyle ':completion:*:history-words' remove-all-dups yes zstyle ':completion:*:history-words' list false zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS} PROMPT=$'%{\e[01;36m%}(%{\e[22;36m%}%n%{\e[01;30m%}@' PROMPT+=$'%{\e[22;36m%}%m%{\e[01;36m%})%{\e[01;36m%}%{\e[01;36m%}(' PROMPT+=$'%{\e[22;36m%}%D{%H:%M}%{\e[01;30m%}+%{\e[22;36m%}%D{%m/%d/%y}' PROMPT+=$'%{\e[01;36m%})%{\e[01;30m\e[00m%}\n%{\e[01;36m%}(' PROMPT+=$'%{\e[22;36m%}%#%{\e[01;30m%}:%{\e[22;36m%}%~%{\e[01;36m%})' PROMPT+=$'%{\e[01;30m\e[00m%} ' if [[ `whoami` = root ]] then PROMPT=$'%{\e[01;31m%}(%{\e[22;31m%}%n%{\e[01;30m%}@' PROMPT+=$'%{\e[22;31m%}%m%{\e[01;31m%})%{\e[01;31m%}%{\e[01;31m%}(' PROMPT+=$'%{\e[22;31m%}%D{%H:%M}%{\e[01;30m%}+%{\e[22;31m%}%D{%m/%d/%y}' PROMPT+=$'%{\e[01;31m%})%{\e[01;30m\e[00m%}\n%{\e[01;31m%}(' PROMPT+=$'%{\e[22;31m%}%#%{\e[01;30m%}:%{\e[22;31m%}%~%{\e[01;31m%})' PROMPT+=$'%{\e[01;30m\e[00m%} ' fi ### END This is truly a beautiful prompt. Enjoy, Vaaf ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Changing prompt
Hi, How could I show the path on prompt or see colored files when I make a ls command? Best Regards, Rodrigo Souza Sao Paulo - Brazil ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"