Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- read -p "Please input username:" USERNAME
- if [ ! -f "/bin/zsh" ]; then
- apt-get install zsh
- fi
- useradd -U -s /bin/zsh -m $USERNAME
- passwd $USERNAME
- # to modify group
- # usermod -a -G group1,group2,group3 username
- # to show groups
- # groups username
- cat <<'EOF' > /home/$USERNAME/.zshrc
- # Lines configured by zsh-newuser-install
- HISTFILE=~/.histfile
- HISTSIZE=1000
- SAVEHIST=1000
- bindkey -v
- # End of lines configured by zsh-newuser-install
- # The following lines were added by compinstall
- zstyle :compinstall filename '/home/$USERNAME/.zshrc'
- autoload -Uz compinit
- compinit
- # End of lines added by compinstall
- PROMPT="%{$fg[green]%}%n%{$reset_color%}@%{$fg[blue]%}%m%{$reset_color%} %1~>"
- RPROMPT="%{$fg[blue]%}%~%{$reset_color%} %{$fg[green]%}[%?]%{$reset_color%}%{$fg[blue]%}%T%{$reset_color%}"
- alias rm='rm -i'
- alias ls='ls --color'
- alias wget='axel'
- EDITOR=vim
- EOF
Add Comment
Please, Sign In to add comment