diff --git a/common/modules/shellprocess_fix_oem_uid.conf b/common/modules/shellprocess_fix_oem_uid.conf new file mode 100644 index 0000000..57b5b3d --- /dev/null +++ b/common/modules/shellprocess_fix_oem_uid.conf @@ -0,0 +1,7 @@ +--- +dontChroot: false +timeout: 120 +script: + - "sed -i 's/oem:x:1000:1000/oem:x:60999:60999/' /etc/passwd" + - "sed -i 's/oem:x:1000/oem:x:60999/' /etc/group" + - "chown -R 60999:60999 /home/oem" diff --git a/debian/changelog b/debian/changelog index 64c15c2..99b7c11 100644 --- a/debian/changelog +++ b/debian/changelog @@ -6,6 +6,14 @@ calamares-settings-ubuntu (1:24.10.2) UNRELEASED; urgency=medium first-time user setup after an OEM installation * ubuntuunity: Do not recommend that the user have an Internet connection during first-time user setup after an OEM installation + * all: Change the UID of the OEM configuration user to 60999. + - This is done because otherwise the OEM configuration user is given UID + 1000. This results in the first real user on the machine having UID + 1001, which could cause issues in a single-user deployment where the + user must have or is assumed to have UID 1000. Setting the OEM + configuration user's UID to 60999 results in the first real user having + UID 1000. This is similar (though not identical) to Ubiquity's behavior + with the OEM configuration user. -- Aaron Rainbolt Wed, 12 Jun 2024 23:26:13 -0500 diff --git a/kubuntu/oem/calamares-launch-oem b/kubuntu/oem/calamares-launch-oem index 37bb38e..fd4adc8 100755 --- a/kubuntu/oem/calamares-launch-oem +++ b/kubuntu/oem/calamares-launch-oem @@ -31,6 +31,9 @@ if kdialog --warningyesno "${msg}"; then # Enable OEM prep module sed -i "/- packages$/a \ \ - shellprocess@oemprep" /etc/calamares/settings.conf; + # Fix OEM UID + sed -i "/- shellprocess@oemprep$/a \ \ - shellprocess@fix-oem-uid" /etc/calamares/settings.conf; + # Force the user of an OEM configuration user cp /etc/calamares/modules/users.conf.oem /etc/calamares/modules/users.conf; diff --git a/kubuntu/settings.conf b/kubuntu/settings.conf index 35d842c..3e75911 100644 --- a/kubuntu/settings.conf +++ b/kubuntu/settings.conf @@ -32,6 +32,9 @@ instances: - id: fixconkeys_part2 module: shellprocess config: shellprocess_fixconkeys_part2.conf +- id: fix-oem-uid + module: shellprocess + config: shellprocess_fix_oem_uid.conf sequence: - show: diff --git a/lubuntu/oem/calamares-launch-oem b/lubuntu/oem/calamares-launch-oem index ae7ad24..ac85ed1 100755 --- a/lubuntu/oem/calamares-launch-oem +++ b/lubuntu/oem/calamares-launch-oem @@ -31,6 +31,9 @@ if kdialog --warningyesno "${msg}"; then # Enable OEM prep module sed -i "/- packages$/a \ \ - shellprocess@oemprep" /etc/calamares/settings.conf; + # Fix OEM UID + sed -i "/- shellprocess@oemprep$/a \ \ - shellprocess@fix-oem-uid" /etc/calamares/settings.conf; + # Force the user of an OEM configuration user cp /etc/calamares/modules/users.conf.oem /etc/calamares/modules/users.conf; diff --git a/lubuntu/settings.conf b/lubuntu/settings.conf index 8307136..5decae2 100644 --- a/lubuntu/settings.conf +++ b/lubuntu/settings.conf @@ -32,6 +32,9 @@ instances: - id: fixconkeys_part2 module: shellprocess config: shellprocess_fixconkeys_part2.conf +- id: fix-oem-uid + module: shellprocess + config: shellprocess_fix_oem_uid.conf sequence: - show: diff --git a/ubuntuunity/oem/calamares-launch-oem b/ubuntuunity/oem/calamares-launch-oem index 6d28c70..a5d6b74 100755 --- a/ubuntuunity/oem/calamares-launch-oem +++ b/ubuntuunity/oem/calamares-launch-oem @@ -28,6 +28,9 @@ if zenity --question --text="${msg}"; then # Enable OEM prep module sed -i "/- packages$/a \ \ - shellprocess@oemprep" /etc/calamares/settings.conf; + # Fix OEM UID + sed -i "/- shellprocess@oemprep$/a \ \ - shellprocess@fix-oem-uid" /etc/calamares/settings.conf; + # Force the user of an OEM configuration user cp /etc/calamares/modules/users.conf.oem /etc/calamares/modules/users.conf; diff --git a/ubuntuunity/settings.conf b/ubuntuunity/settings.conf index 5011a47..cee9de0 100644 --- a/ubuntuunity/settings.conf +++ b/ubuntuunity/settings.conf @@ -32,6 +32,9 @@ instances: - id: fixconkeys_part2 module: shellprocess config: shellprocess_fixconkeys_part2.conf +- id: fix-oem-uid + module: shellprocess + config: shellprocess_fix_oem_uid.conf sequence: - show: