From 3749beb4e52297c6be57e67641a8a2c75a73eb41 Mon Sep 17 00:00:00 2001 From: Gabriel Craciunescu Date: Mon, 30 Oct 2017 20:44:51 +0100 Subject: [PATCH 1/3] modules/users: warn when fallback groups is used - Warn here since it may not be what the Distributor want. Having wrong groups may result in broken permissions for created user. - explain what defaultGroups is for in users.conf --- src/modules/users/UsersViewStep.cpp | 2 ++ src/modules/users/users.conf | 3 +++ 2 files changed, 5 insertions(+) diff --git a/src/modules/users/UsersViewStep.cpp b/src/modules/users/UsersViewStep.cpp index 73dc98ddc..34c6614f8 100644 --- a/src/modules/users/UsersViewStep.cpp +++ b/src/modules/users/UsersViewStep.cpp @@ -2,6 +2,7 @@ * * Copyright 2014-2015, Teo Mrnjavac * Copyright 2017, Adriaan de Groot + * Copyright 2017, Gabriel Craciunescu * * Calamares is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -131,6 +132,7 @@ UsersViewStep::setConfigurationMap( const QVariantMap& configurationMap ) } else { + cDebug() << "WARNING: Using fallback groups. Please check defaultGroups in users.conf"; m_defaultGroups = QStringList{ "lp", "video", "network", "storage", "wheel", "audio" }; } diff --git a/src/modules/users/users.conf b/src/modules/users/users.conf index d5466c62f..5e62015a0 100644 --- a/src/modules/users/users.conf +++ b/src/modules/users/users.conf @@ -11,6 +11,8 @@ # These globalconfig keys are set when the jobs for this module # are created. --- +# Used as default groups for the created user. +# Adjust to your Distribution defaults. defaultGroups: - users - lp @@ -19,6 +21,7 @@ defaultGroups: - storage - wheel - audio + autologinGroup: autologin doAutologin: true From 599f9d48ae4e27a0c576be7733fa896926233063 Mon Sep 17 00:00:00 2001 From: Gabriel Craciunescu Date: Mon, 30 Oct 2017 23:20:43 +0100 Subject: [PATCH 2/3] users.conf: document some things --- src/modules/users/users.conf | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/modules/users/users.conf b/src/modules/users/users.conf index 5e62015a0..41acbc3a4 100644 --- a/src/modules/users/users.conf +++ b/src/modules/users/users.conf @@ -22,13 +22,26 @@ defaultGroups: - wheel - audio +# Some Distributions require a 'autologin' group for the user. +# Autologin causes a user to become automatically logged in to +# the desktop environment on boot. +# Disable when your Distribution does not require such a group. autologinGroup: autologin +# You can control the initial state for the 'autologin checkbox' in UsersViewStep here. +# Possible values are: true to enable or false to disable the checkbox by default doAutologin: true -# remove the following line to avoid creating /etc/sudoers.d/10-installer +# When enabled calamares creates a sudoers file for the user. +# /etc/sudoers.d/10-installer +# Remember to add sudoersGroup to defaultGroups. sudoersGroup: wheel +# Setting this to false , causes the root account to be disabled. setRootPassword: true +# You can control the initial state for the 'root password checkbox' in UsersViewStep here. +# Possible values are: true to enable or false to disable the checkbox by default. +# When enabled the user password is used for the root account too. +# NOTE: doReusePassword requires setRootPassword to be enabled. doReusePassword: true # These are optional password-requirements that a distro can enforce From 477a9855f6cf02058525c93030400f59aab34b2d Mon Sep 17 00:00:00 2001 From: Gabriel Craciunescu Date: Tue, 31 Oct 2017 13:09:34 +0100 Subject: [PATCH 3/3] users.conf: made requested changes --- src/modules/users/users.conf | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/modules/users/users.conf b/src/modules/users/users.conf index 41acbc3a4..1f62fc1e5 100644 --- a/src/modules/users/users.conf +++ b/src/modules/users/users.conf @@ -31,9 +31,14 @@ autologinGroup: autologin # Possible values are: true to enable or false to disable the checkbox by default doAutologin: true -# When enabled calamares creates a sudoers file for the user. +# When set to a non-empty string, Calamares creates a sudoers file for the user. # /etc/sudoers.d/10-installer # Remember to add sudoersGroup to defaultGroups. +# +# If your Distribution already sets up a group of sudoers in its packaging, +# remove this setting (delete or comment out the line below). Otherwise, +# the setting will be duplicated in the /etc/sudoers.d/10-installer file, +# potentially confusing users. sudoersGroup: wheel # Setting this to false , causes the root account to be disabled.