[users] Add a *permissions* setting for overriding useradd
This commit is contained in:
parent
e57aab2008
commit
f5c425345b
@ -259,6 +259,9 @@ public:
|
|||||||
const QStringList& forbiddenLoginNames() const;
|
const QStringList& forbiddenLoginNames() const;
|
||||||
const QStringList& forbiddenHostNames() const;
|
const QStringList& forbiddenHostNames() const;
|
||||||
|
|
||||||
|
int homePermissions() const { return m_homeDirPermissions; }
|
||||||
|
int homeUMask() const { return m_homeDirPermissions >= 0 ? ( ( ~m_homeDirPermissions ) & 0777 ) : -1; }
|
||||||
|
|
||||||
public Q_SLOTS:
|
public Q_SLOTS:
|
||||||
/** @brief Sets the user's shell if possible
|
/** @brief Sets the user's shell if possible
|
||||||
*
|
*
|
||||||
|
@ -214,9 +214,15 @@ allowWeakPasswordsDefault: false
|
|||||||
# contains "root" and "nobody", but may be extended to list other special
|
# contains "root" and "nobody", but may be extended to list other special
|
||||||
# names for a given distro (eg. "video", or "mysql" might not be a valid
|
# names for a given distro (eg. "video", or "mysql" might not be a valid
|
||||||
# end-user login name).
|
# end-user login name).
|
||||||
|
# - *home_permissions* Home directory of the user is given **approximately**
|
||||||
|
# this set of permissions. Write the permissions in octal. If not set,
|
||||||
|
# there is no default and no permission-setting is done (uses defaults of
|
||||||
|
# `useradd` in the target). A umask is computed from these permissions
|
||||||
|
# and passed to `useradd`.
|
||||||
user:
|
user:
|
||||||
shell: /bin/bash
|
shell: /bin/bash
|
||||||
forbidden_names: [ root ]
|
forbidden_names: [ root ]
|
||||||
|
home_permissions: 0700
|
||||||
|
|
||||||
|
|
||||||
# Hostname settings
|
# Hostname settings
|
||||||
|
@ -13,6 +13,7 @@ properties:
|
|||||||
# User shell, should be path to /bin/sh or so
|
# User shell, should be path to /bin/sh or so
|
||||||
shell: { type: string }
|
shell: { type: string }
|
||||||
forbidden_names: { type: array, items: { type: string } }
|
forbidden_names: { type: array, items: { type: string } }
|
||||||
|
home_permissions: { type: string }
|
||||||
# Group settings
|
# Group settings
|
||||||
defaultGroups:
|
defaultGroups:
|
||||||
type: array
|
type: array
|
||||||
|
Loading…
Reference in New Issue
Block a user