RSS: Blog | Wiki | Forum

Sofware settings

From Easyneufenglish

Jump to: navigation, search

Contents

[edit] Autologin

The system starts automatically the graphic display without asking for any password. The file /etc/default/default_login contains on one line the name of the user to create. If the file doesn't exist, leneuf user will be used. This user can be used for the first machine configuration.

Autologin is activated one time per system boot. We are going to use the combonation of the guetty program and busybox login to create this function.

[edit] Inittab configuration

We are going to replace the /usr/bin/login program by a simple shell script (/bin/9login) which is going to act like a wrapper. It will ensure many roles:

  • find the user who wants to log in
  • check that the user exists
  • create the user account, if the user didn't exists

The file /etc/inittab is modified like below:

...
tty1::once:/sbin/getty 38400 tty1 -n -l /bin/9login 
tty2::respawn:/sbin/getty 38400 tty2
...

[edit] Getty configuration

  • Getty supports an option ({{{-n}}}) which is not asking the login question. While launching getty, this option will be used.
  • The default program /bin/login will be replaced by the program /bin/9login

[edit] Login configuration

Login DON'T verify the password if the user launching it is the root. This option is used as an argument on getty.

Login launch automatically alogin shell. In the .profile, you just have to launch the Xwindows session to start the necessary tools.

[edit] Content of the /bin/9login file

#!/bin/sh
# Copyright: 9neuf-cegetel
# Licence: GPL

# Get the default login
default_login="leneuf"
if [ -f "/etc/default_login" ]; then
  # Only this character set is authorized
  /bin/grep -q "[a-zA-Z0-9]*" /etc/default_login
  if [ $? -eq 0 ]; then
    default_login=$(cat /etc/default_login)
  fi 
fi

# Test if the user exist
id $default_login >/dev/null 2>&1
if [ $? -eq 0 ]; then
  # Create the account directory if it doesn't exist
  if [ ! -d /home/$default_login ]; then
    /bin/mkdir /home/$default_login
    (cd /etc/skel/ ; /bin/cp -a . /home/$default_login/)
    /bin/chown -R $default_login:$default_login /home/$default_login
  fi
  exec /bin/login -f "$default_login"
else
  exec /bin/login
fi

[edit] Guest account personalization

  • new account creation
  • permissions administration

[edit] Graphic manager personalization

[edit] Pictures acquisition personalization

[edit] Printing configuration