Merge lp:~tom-gall/linaro/live-helper-alip-setup-default-user into lp:~linaro-maintainers/linaro/live-helper.config.maverick.alip

Proposed by Tom Gall
Status: Merged
Merge reported by: Steve Langasek
Merged at revision: not available
Proposed branch: lp:~tom-gall/linaro/live-helper-alip-setup-default-user
Merge into: lp:~linaro-maintainers/linaro/live-helper.config.maverick.alip
Diff against target: 67 lines (+43/-0)
5 files modified
chroot_local-hooks/01-setup_user_linaro.sh (+6/-0)
chroot_local-hooks/02-add_linaro_to-admin.sh (+5/-0)
chroot_local-hooks/03-check_sudoers_for_admin.sh (+10/-0)
chroot_local-hooks/04-update_gdm_custom.sh (+18/-0)
chroot_local-hooks/05-touch_ICEauthority.sh (+4/-0)
To merge this branch: bzr merge lp:~tom-gall/linaro/live-helper-alip-setup-default-user

Description of the change

This set of changes introduces 5 very short scripts into chroot_local-hook

In a nutshell these scripts:
1) create the linaro user and set the password to linaro
2) add the linaro user to the admin group
3) Check for the existence of admin in the sudoers file and if not there add it
4) setup the etc/gdm/custom.conf file or modify it so linaro will be auto logged in
5) and lastly touch .ICEauthority, for autologin (this one is curious and I am going to get to the bottom of why this appears to be needed so I expect to adjust shortly)

So for the purposes of getting linaro-alip images working and useful I request that these changes go forward.

To post a comment you must log in.
42. By Steve Langasek

merge initial login fixes from Tom

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added file 'chroot_local-hooks/01-setup_user_linaro.sh'
2--- chroot_local-hooks/01-setup_user_linaro.sh 1970-01-01 00:00:00 +0000
3+++ chroot_local-hooks/01-setup_user_linaro.sh 2010-09-29 14:32:46 +0000
4@@ -0,0 +1,6 @@
5+#!/bin/sh
6+
7+echo "I: create linaro user"
8+adduser --gecos linaro --disabled-login linaro
9+echo "I: set linaro user password"
10+echo "linaro:linaro" | chpasswd
11
12=== added file 'chroot_local-hooks/02-add_linaro_to-admin.sh'
13--- chroot_local-hooks/02-add_linaro_to-admin.sh 1970-01-01 00:00:00 +0000
14+++ chroot_local-hooks/02-add_linaro_to-admin.sh 2010-09-29 14:32:46 +0000
15@@ -0,0 +1,5 @@
16+#!/bin/sh
17+
18+echo "I: add linaro to admin group"
19+usermod -G admin linaro
20+
21
22=== added file 'chroot_local-hooks/03-check_sudoers_for_admin.sh'
23--- chroot_local-hooks/03-check_sudoers_for_admin.sh 1970-01-01 00:00:00 +0000
24+++ chroot_local-hooks/03-check_sudoers_for_admin.sh 2010-09-29 14:32:46 +0000
25@@ -0,0 +1,10 @@
26+#!/bin/sh
27+
28+# check to make sure sudoers file has ref for admin
29+ADMINEXISTS="$(awk '$1 == "%admin" { print $1 }' /etc/sudoers)"
30+if [ "%admin" != "$ADMINEXISTS" ]; then
31+ # append admin entry to sudoers
32+ echo "# Members of the admin group may gain root privileges" >> /etc/sudoers
33+ echo "%admin ALL=(ALL) ALL" >> /etc/sudoers
34+fi
35+
36
37=== added file 'chroot_local-hooks/04-update_gdm_custom.sh'
38--- chroot_local-hooks/04-update_gdm_custom.sh 1970-01-01 00:00:00 +0000
39+++ chroot_local-hooks/04-update_gdm_custom.sh 2010-09-29 14:32:46 +0000
40@@ -0,0 +1,18 @@
41+#!/bin/sh
42+
43+echo "I: create / modify /etc/gdm/custom.conf"
44+
45+if [ -e /etc/gdm/custom.conf ]; then
46+
47+sed -i 's/\(AutomaticLogin=\).*/\1linaro/g' /etc/gdm/custom.conf
48+sed -i 's/\(AutomaticLoginEnable=\).*/\1true/g' /etc/gdm/custom.conf
49+
50+else
51+
52+cat > /etc/gdm/custom.conf <<EOF
53+[daemon]
54+AutomaticLoginEnable=true
55+AutomaticLogin=linaro
56+EOF
57+
58+fi
59
60=== added file 'chroot_local-hooks/05-touch_ICEauthority.sh'
61--- chroot_local-hooks/05-touch_ICEauthority.sh 1970-01-01 00:00:00 +0000
62+++ chroot_local-hooks/05-touch_ICEauthority.sh 2010-09-29 14:32:46 +0000
63@@ -0,0 +1,4 @@
64+#!/bin/sh
65+touch ~linaro/.ICEauthority
66+chown linaro:linaro ~linaro/.ICEauthority
67+chmod 644 ~linaro/.ICEauthority

Subscribers

People subscribed via source and target branches

to all changes: