diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 05:55:27 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 05:55:27 +0000 |
commit | 32e0ba8ebdadc47ac1a0da8d9a9668ff21909e4f (patch) | |
tree | ebaa5eacafe874b431d69e52f0f73c013c3017ae /examples/adduser.local.conf.examples | |
parent | Initial commit. (diff) | |
download | adduser-252eb0cc82c7e9015fba4d5a69fea34b38b200a7.tar.xz adduser-252eb0cc82c7e9015fba4d5a69fea34b38b200a7.zip |
Adding upstream version 3.118+deb11u1.upstream/3.118+deb11u1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'examples/adduser.local.conf.examples')
7 files changed, 380 insertions, 0 deletions
diff --git a/examples/adduser.local.conf.examples/adduser.conf b/examples/adduser.local.conf.examples/adduser.conf new file mode 100644 index 0000000..a3b914e --- /dev/null +++ b/examples/adduser.local.conf.examples/adduser.conf @@ -0,0 +1,90 @@ +# /etc/adduser.conf: `adduser' configuration. +# See adduser(8) and adduser.conf(5) for full documentation. + +# [JNZ] Modified 21-Jun-2013 + +# Modified from the version shipped with adduser(8) by John Zaitseff. +# These modifications are released into the public domain. + +# The DSHELL variable specifies the default login shell on your +# system. +DSHELL=/bin/bash + +# The DHOME variable specifies the directory containing users' home +# directories. +DHOME=/home + +# If GROUPHOMES is "yes", then the home directories will be created as +# /home/groupname/user. +GROUPHOMES=no + +# If LETTERHOMES is "yes", then the created home directories will have +# an extra directory - the first letter of the user name. For example: +# /home/u/user. +LETTERHOMES=no + +# The SKEL variable specifies the directory containing "skeletal" user +# files; in other words, files such as a sample .profile that will be +# copied to the new user's home directory when it is created. +SKEL=/etc/skel + +# FIRST_SYSTEM_[GU]ID to LAST_SYSTEM_[GU]ID inclusive is the range for UIDs +# for dynamically allocated administrative and system accounts/groups. +# Please note that system software, such as the users allocated by the +# base-passwd package, may assume that UIDs less than 100 are unallocated. +FIRST_SYSTEM_UID=100 +LAST_SYSTEM_UID=999 + +FIRST_SYSTEM_GID=100 +LAST_SYSTEM_GID=999 + +# FIRST_[GU]ID to LAST_[GU]ID inclusive is the range of UIDs of dynamically +# allocated user accounts/groups. +FIRST_UID=1000 +LAST_UID=59999 + +FIRST_GID=1000 +LAST_GID=59999 + +# The USERGROUPS variable can be either "yes" or "no". If "yes" each +# created user will be given their own group to use as a default. If +# "no", each created user will be placed in the group whose gid is +# USERS_GID (see below). +USERGROUPS=yes + +# If USERGROUPS is "no", then USERS_GID should be the GID of the group +# `users' (or the equivalent group) on your system. +USERS_GID=100 + +# If DIR_MODE is set, directories will be created with the specified +# mode. Otherwise the default mode 0755 will be used. +DIR_MODE=0755 + +# If SETGID_HOME is "yes" home directories for users with their own +# group the setgid bit will be set. This was the default for +# versions << 3.13 of adduser. Because it has some bad side effects we +# no longer do this per default. If you want it nevertheless you can +# still set it here. +SETGID_HOME=no + +# If QUOTAUSER is set, a default quota will be set from that user with +# `edquota -p QUOTAUSER newuser' +QUOTAUSER="" + +# If SKEL_IGNORE_REGEX is set, adduser will ignore files matching this +# regular expression when creating a new home directory +SKEL_IGNORE_REGEX="dpkg-(old|new|dist|save)" + +# Set this if you want the --add_extra_groups option to adduser to add +# new users to other groups. +# This is the list of groups that new non-system users will be added to +# Default: +#EXTRA_GROUPS="dialout cdrom floppy audio video plugdev users" + +# If ADD_EXTRA_GROUPS is set to something non-zero, the EXTRA_GROUPS +# option above will be default behavior for adding new, non-system users +#ADD_EXTRA_GROUPS=1 + + +# check user and group names also against this regular expression. +#NAME_REGEX="^[a-z][-a-z0-9_]*\$" diff --git a/examples/adduser.local.conf.examples/bash.bashrc b/examples/adduser.local.conf.examples/bash.bashrc new file mode 100644 index 0000000..de42139 --- /dev/null +++ b/examples/adduser.local.conf.examples/bash.bashrc @@ -0,0 +1,96 @@ +######################################################################### +# /etc/bash.bashrc: System-wide initialisation file for Bash # +######################################################################### + +# [JNZ] Modified 21-Jun-2013 + +# This script file is sourced by bash(1) for interactive shells. It is +# also sourced by /etc/profile for (possibly non-interactive) login +# shells. +# +# Written by John Zaitseff and released into the public domain. + + +# Useful shell settings + +shopt -s checkwinsize expand_aliases +set -P + +# Useful variable settings + +export LANG=en_AU.UTF-8 # We are in Australia +export LC_ALL=en_AU.UTF-8 +export TIME_STYLE=$'+%b %e %Y\n%b %e %H:%M' # As used by ls(1) + +# Useful aliases, defined whether or not this shell is interactive + +alias cls=clear +alias ls="ls -v" +alias ll="ls -l" +alias l.="ls -A" +alias dir="ls -laF" +alias e="emacs -nw" +alias lo=libreoffice + +# Set a variable identifying any Debian Chroot Compilation Environment + +if [ -z "$debian_chroot" -a -r /etc/debian_chroot ]; then + export debian_chroot=$(cat /etc/debian_chroot) +fi + +# Run the following only if this shell is interactive + +if [ "$PS1" ]; then + + export HISTIGNORE="&: +.*" # Forget commands starting with space + unset HISTFILE # Don't save commands to history file + export LESSHISTFILE=- # Don't save history for less(1) + export PROMPT_DIRTRIM=2 # Trailing directory components to keep + + # Make less(1) more friendly for non-text input files + if [ -x /usr/bin/lesspipe ]; then + eval $(/usr/bin/lesspipe) + fi + + # Allow the Debian Chroot Compilation Environment to modify the prompt + if [ -z "$debian_chroot" ]; then + PS1h="\h" + else + PS1h="($debian_chroot)" + fi + + # Set options depending on terminal type + if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then + # The terminal supports colour: assume it complies with ECMA-48 + # (ISO/IEC-6429). This is almost always the case... + + # Make ls(1) use colour in its listings + if [ -x /usr/bin/dircolors ]; then + alias ls="ls -v --color=auto" + eval $(/usr/bin/dircolors --sh) + fi + + # Set the terminal prompt + if [ $(id -u) -ne 0 ]; then + PS1="\[\e[42;30m\]\u@$PS1h\[\e[37m\]:\[\e[30m\]\w\[\e[0m\] \\\$ " + else + # Root user gets a nice RED prompt! + PS1="\[\e[41;37;1m\]\u@$PS1h\[\e[30m\]:\[\e[37m\]\w\[\e[0m\] \\\$ " + fi + else + # The terminal does not support colour + PS1="\u@$PS1h:\w \\\$ " + fi + + # Allow bash(1) completion in interactive shells + + if ! shopt -oq posix; then + if [ -f /usr/share/bash-completion/bash_completion ]; then + . /usr/share/bash-completion/bash_completion + elif [ -f /etc/bash_completion ]; then + . /etc/bash_completion + fi + fi + + unset PS1h +fi diff --git a/examples/adduser.local.conf.examples/profile b/examples/adduser.local.conf.examples/profile new file mode 100644 index 0000000..2c2b70a --- /dev/null +++ b/examples/adduser.local.conf.examples/profile @@ -0,0 +1,88 @@ +######################################################################### +# /etc/profile: System-wide initialisation file for Bourne shells # +######################################################################### + +# [JNZ] Modified 21-Jun-2013 + +# This script file is sourced by Bourne-compatible shells, such as sh(1), +# bash(1), ksh(1) and ash(1), when those shells are run as a login shell. +# +# When a login shell starts, the following script files are sourced, in +# this order: +# +# /etc/profile - this file +# /etc/profile.d/*.sh - additional profile scripts +# /etc/bash.bashrc - sourced by this file (only for bash(1)) +# $HOME/.bash_profile - run by bash(1) +# $HOME/.bashrc - sourced by the default $HOME/.bash_profile +# +# When a normal (non-login) bash(1) shell starts, the following files are +# sourced: +# +# /etc/bash.bashrc - run by bash(1) +# $HOME/.bashrc - run by bash(1) +# +# Written by John Zaitseff and released into the public domain. + + +umask 022 + +# Set the default executable path, as ENV_PATH and ENV_SUPATH in +# /etc/login.defs does not always seem to be consulted + +if [ "`id -u`" -eq 0 ]; then + PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" +else + PATH="/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games" +fi + +# Augment various paths as required + +if [ -d $HOME/bin ]; then + PATH=$HOME/bin:$PATH +fi + +if [ -d $HOME/man ]; then + MANPATH=$HOME/man:$MANPATH + export MANPATH +fi +if [ -d $HOME/lib/man ]; then + MANPATH=$HOME/lib/man:$MANPATH + export MANPATH +fi + +export PATH + +# Set the default prompt for interactive shells + +if [ "$PS1" ]; then + if [ "$BASH" ] && [ "$BASH" != "/bin/sh" ]; then + PS1="\u@\h:\w \\\$ " + else + if [ "`id -u`" -eq 0 ]; then + PS1='# ' + else + PS1='$ ' + fi + fi +fi + +# Source all *.sh scripts in /etc/profile.d + +if [ -d /etc/profile.d ]; then + for i in /etc/profile.d/*.sh; do + if [ -r "$i" ]; then + . "$i" + fi + done + unset i +fi + +# If this is a bash(1) shell, source an additional initialisation script. +# This may override variables, functions and aliases set above. + +if [ "$BASH" ] && [ "$BASH" != "/bin/sh" ]; then + if [ -r /etc/bash.bashrc ]; then + . /etc/bash.bashrc + fi +fi diff --git a/examples/adduser.local.conf.examples/skel.other/index.html b/examples/adduser.local.conf.examples/skel.other/index.html new file mode 100644 index 0000000..d4eb6be --- /dev/null +++ b/examples/adduser.local.conf.examples/skel.other/index.html @@ -0,0 +1,28 @@ +<!DOCTYPE html> +<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> + +<!-- This document is a place-holder for the home page until the user + gets around to replacing it with his or her own. + + [JNZ] Modified 21-Jun-2013 + + Written by John Zaitseff and released into the public domain. --> + +<head> + <title>My Home Page</title> + <meta charset="UTF-8" /> + <meta name="author" content="The user"> + <meta name="description" content="The user's default home page"> + <meta name="keywords" content="home, homepage, default"> +</head> + +<body> + +<h1>My Home Page</h1> + +<p>Welcome to my home page on the World Wide Web! This page, like so +many others, is under construction. I’ll be replacing this page +soon… I hope.</p> + +</body> +</html> diff --git a/examples/adduser.local.conf.examples/skel/dot.bash_logout b/examples/adduser.local.conf.examples/skel/dot.bash_logout new file mode 100644 index 0000000..922c64b --- /dev/null +++ b/examples/adduser.local.conf.examples/skel/dot.bash_logout @@ -0,0 +1,10 @@ +######################################################################### +# ~/.bash_logout: Personal log-out script for Bash # +######################################################################### + +# [JNZ] Modified 21-Jun-2013 + +# This script file is sourced by bash(1) when the login shell terminates. +# By default, no action is taken. +# +# Written by John Zaitseff and released into the public domain. diff --git a/examples/adduser.local.conf.examples/skel/dot.bash_profile b/examples/adduser.local.conf.examples/skel/dot.bash_profile new file mode 100644 index 0000000..d8b0331 --- /dev/null +++ b/examples/adduser.local.conf.examples/skel/dot.bash_profile @@ -0,0 +1,45 @@ +######################################################################### +# ~/.bash_profile: Personal initialisation script for Bash # +######################################################################### + +# [JNZ] Modified 21-Jun-2013 + +# This script file is sourced by bash(1) for login shells. +# +# When a login shell starts, the following script files are sourced, in +# this order: +# +# /etc/profile - run by bash(1) +# /etc/profile.d/*.sh - additional profile scripts +# /etc/bash.bashrc - sourced by /etc/profile file (only for bash(1)) +# $HOME/.bash_profile - this file +# $HOME/.bashrc - sourced by this file (if unchanged) +# +# When a normal (non-login) bash(1) shell starts, the following files are +# sourced: +# +# /etc/bash.bashrc - run by bash(1) +# $HOME/.bashrc - run by bash(1) +# +# Written by John Zaitseff and released into the public domain. + + +if [ -f $HOME/.bashrc ]; then + . $HOME/.bashrc +fi + +# Display a verse from the Bible + +if [ ! -f $HOME/.hushlogin ] && [ ! -f $HOME/.hushverse ]; then + if [ $(type -p verse) ]; then + echo + verse + echo + fi +fi + +# Turn on talk(1) messages, unless the user does not want this + +if [ ! -f $HOME/.hushlogin ] && [ ! -f $HOME/.hushtalk ]; then + mesg y 2>/dev/null +fi diff --git a/examples/adduser.local.conf.examples/skel/dot.bashrc b/examples/adduser.local.conf.examples/skel/dot.bashrc new file mode 100644 index 0000000..36f56fe --- /dev/null +++ b/examples/adduser.local.conf.examples/skel/dot.bashrc @@ -0,0 +1,23 @@ +######################################################################### +# ~/.bashrc: Personal initialisation script for Bash # +######################################################################### + +# [JNZ] Modified 21-Jun-2013 + +# This script file is sourced by interactive Bash shells (ie, shells for +# which you are able to provide keyboard input). It is also sourced by +# ~/.bash_profile for login shells. It is the best place to put shell +# variables, functions and aliases. +# +# Written by John Zaitseff and released into the public domain. + + +# Variable settings for your convenience + +export EDITOR=emacs # Everyone's favourite editor + +# Run the following only if this shell is interactive + +if [ "$PS1" ]; then + export IGNOREEOF=5 # Disallow accidental Ctrl-D +fi |