This file is indexed.

/usr/share/initramfs-tools/scripts/casper-bottom/15autologin is in casper 1.315.

This file is owned by root:root, with mode 0o755.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
#!/bin/sh

PREREQ=""
DESCRIPTION="Setting up automatic login..."

prereqs()
{
       echo "$PREREQ"
}

case $1 in
# get pre-requisites
prereqs)
       prereqs
       exit 0
       ;;
esac

. /scripts/casper-functions

log_begin_msg "$DESCRIPTION"

if [ -d /root/etc/gdm ]; then
    # Configure GDM autologin
    GDMCustomFile=/root/etc/gdm/custom.conf
    AutologinParameters="AutomaticLoginEnable=true\n\
AutomaticLogin=$USERNAME\n\
TimedLoginEnable=true\n\
TimedLogin=$USERNAME\n\
TimedLoginDelay=10"

    # Prevent from updating if parameters already present (persistent usb key)
    if ! `grep -qs 'AutomaticLoginEnable' $GDMCustomFile` ; then
        if ! `grep -qs '\[daemon\]' $GDMCustomFile` ; then
            echo '[daemon]' >> $GDMCustomFile
        fi
        sed -i "s/\[daemon\]/\[daemon\]\n$AutologinParameters/" $GDMCustomFile
        printf "[com.canonical.indicator.session]\nsuppress-logout-menuitem=true\n" >> /root/usr/share/glib-2.0/schemas/casper.gschema.override
        chroot /root glib-compile-schemas /usr/share/glib-2.0/schemas/
    fi
fi

if [ -f /root/etc/kde4/kdm/kdmrc ]; then
    # Configure KDM autologin
    sed -i -r \
        -e "s/^#?AutoLoginEnable=.*\$/AutoLoginEnable=true/" \
        -e "s/^#?AutoLoginUser=.*\$/AutoLoginUser=$USERNAME/" \
        -e "s/^#?AutoReLogin=.*\$/AutoReLogin=true/" \
        /root/etc/kde4/kdm/kdmrc
fi

if [ -f /root/etc/lxdm/lxdm.conf ]; then
    # Configure LXDM autologin with LXDE session
   sed -i -r \
        -e "s/^# autologin=dgod/autologin=$USERNAME/" \
        -e "s/^# session/session/" \
        -e "s/startlxde/startlubuntu/" \
        /root/etc/lxdm/lxdm.conf
fi

if [ -f /root/etc/xdg/lubuntu/lxdm/lxdm.conf ]; then
    # Configure LXDM autologin with Lubuntu session
   sed -i -r \
        -e "s/^# autologin=dgod/autologin=$USERNAME/" \
        -e "s/^# session/session/" \
        -e "s/startlxde/startlubuntu/" \
        /root/etc/xdg/lubuntu/lxdm/lxdm.conf
fi

if [ -d /root/etc/lightdm ]; then
    # Configure LightDM autologin
    LightDMCustomFile=/root/etc/lightdm/lightdm.conf
    AutologinParameters="allow-guest=false\n\
autologin-guest=false\n\
autologin-user=$USERNAME\n\
autologin-user-timeout=0\n\
autologin-session=lightdm-autologin"

    # Prevent from updating if parameters already present (persistent usb key)
    if ! `grep -qs '^autologin-user' $LightDMCustomFile` ; then
        if ! `grep -qs '\[SeatDefaults\]' $LightDMCustomFile` ; then
            echo '[SeatDefaults]' >> $LightDMCustomFile
        fi
        sed -i "s/\[SeatDefaults\]/\[SeatDefaults\]\n$AutologinParameters/" $LightDMCustomFile
    fi

    # LightDM on kubuntu-active wants to start ubuntu.desktop, workaround here for now jriddell 2012-03-15
    if [ -e /root/usr/share/xsessions/plasma-active.desktop ]; then
        cp /root/usr/share/xsessions/plasma-active.desktop /root/usr/share/xsessions/ubuntu.desktop
    fi
fi

log_end_msg