Examples

[main]     [download]     [tutorial]     [reference documentation]


Don't hesitate to send me your description files, I could add some of them on this page.

This is an example of how to use LUCI to edit the adduser.conf file (the configuration file of the adduser command) as it is installed on an Debian Potato. On the right, you have the file to edit, and on the left, the corresponding LUCI window.
Take a look at the corresponding description file to see how it is done. It uses some python functions to get the valid login shells and the exiting groups and GID on the system. Each entry has a short description that popups as a tool tip.
# /etc/adduser.conf: `adduser' configuration.
# See adduser(8) and adduser.conf(5) for full documentation.

# 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_UID to LAST_SYSTEM_UID inclusive is the range for UIDs
# for dynamically allocated administrative and system accounts.
FIRST_SYSTEM_UID=100
LAST_SYSTEM_UID=999

# FIRST_UID to LAST_UID inclusive is the range of UIDs of dynamically
# allocated user accounts.
FIRST_UID=1000
LAST_UID=29999

# 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, and
# their home directories will be g+s.  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 QUOTAUSER is set, a default quota will be set from that user with
# `edquota -p QUOTAUSER newuser'
QUOTAUSER=""


 

This one shows how to use LUCI to set environment variables (here in the .bash_profile). Here is the corresponding description file. There is some python stuffs in the description file to get locales installed on the system. Note that all the variables are optional. If you uncheck one of the entry, the corresponding variable will be commented in the file. In this example, the LESSCHARSET is commented, so the corresponding entry is inactive in LUCI. You just have to click the check box on the left of less character set to uncomment it.
# ~/.bash_profile: executed by bash(1) for login shells.

if [ -f /etc/environement ]; then
  source /etc/environement
fi

if [ -f ~/.bashrc ]; then
  source ~/.bashrc
fi

umask 002
export PATH=$PATH:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/X11R6/bin:~/bin

#export LESSCHARSET=iso8859
export LANG=fr
export EDITOR=vi
export PS1="\u@\h:\w\$ "
export MAILCHECK=60