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
=== added file 'chroot_local-hooks/01-setup_user_linaro.sh'
--- chroot_local-hooks/01-setup_user_linaro.sh 1970-01-01 00:00:00 +0000
+++ chroot_local-hooks/01-setup_user_linaro.sh 2010-09-29 14:32:46 +0000
@@ -0,0 +1,6 @@
1#!/bin/sh
2
3echo "I: create linaro user"
4adduser --gecos linaro --disabled-login linaro
5echo "I: set linaro user password"
6echo "linaro:linaro" | chpasswd
07
=== added file 'chroot_local-hooks/02-add_linaro_to-admin.sh'
--- chroot_local-hooks/02-add_linaro_to-admin.sh 1970-01-01 00:00:00 +0000
+++ chroot_local-hooks/02-add_linaro_to-admin.sh 2010-09-29 14:32:46 +0000
@@ -0,0 +1,5 @@
1#!/bin/sh
2
3echo "I: add linaro to admin group"
4usermod -G admin linaro
5
06
=== added file 'chroot_local-hooks/03-check_sudoers_for_admin.sh'
--- chroot_local-hooks/03-check_sudoers_for_admin.sh 1970-01-01 00:00:00 +0000
+++ chroot_local-hooks/03-check_sudoers_for_admin.sh 2010-09-29 14:32:46 +0000
@@ -0,0 +1,10 @@
1#!/bin/sh
2
3# check to make sure sudoers file has ref for admin
4ADMINEXISTS="$(awk '$1 == "%admin" { print $1 }' /etc/sudoers)"
5if [ "%admin" != "$ADMINEXISTS" ]; then
6 # append admin entry to sudoers
7 echo "# Members of the admin group may gain root privileges" >> /etc/sudoers
8 echo "%admin ALL=(ALL) ALL" >> /etc/sudoers
9fi
10
011
=== added file 'chroot_local-hooks/04-update_gdm_custom.sh'
--- chroot_local-hooks/04-update_gdm_custom.sh 1970-01-01 00:00:00 +0000
+++ chroot_local-hooks/04-update_gdm_custom.sh 2010-09-29 14:32:46 +0000
@@ -0,0 +1,18 @@
1#!/bin/sh
2
3echo "I: create / modify /etc/gdm/custom.conf"
4
5if [ -e /etc/gdm/custom.conf ]; then
6
7sed -i 's/\(AutomaticLogin=\).*/\1linaro/g' /etc/gdm/custom.conf
8sed -i 's/\(AutomaticLoginEnable=\).*/\1true/g' /etc/gdm/custom.conf
9
10else
11
12cat > /etc/gdm/custom.conf <<EOF
13[daemon]
14AutomaticLoginEnable=true
15AutomaticLogin=linaro
16EOF
17
18fi
019
=== added file 'chroot_local-hooks/05-touch_ICEauthority.sh'
--- chroot_local-hooks/05-touch_ICEauthority.sh 1970-01-01 00:00:00 +0000
+++ chroot_local-hooks/05-touch_ICEauthority.sh 2010-09-29 14:32:46 +0000
@@ -0,0 +1,4 @@
1#!/bin/sh
2touch ~linaro/.ICEauthority
3chown linaro:linaro ~linaro/.ICEauthority
4chmod 644 ~linaro/.ICEauthority

Subscribers

People subscribed via source and target branches

to all changes: