83c6575d51
This also changes the group wrs_protected to sys_protected to de-brand the user and group names. Depends-On: I887464a20fc17d66529caea03be2b445156f9426 Change-Id: Ic2ea06d3ac15c31854a604af5f4cecf9094fcaea Story: 2004716 Task: 28748 Signed-off-by: Saul Wold <sgw@linux.intel.com>
37 lines
847 B
RPMSpec
37 lines
847 B
RPMSpec
#
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
#
|
|
# Copyright (C) 2019 Intel Corporation
|
|
#
|
|
Summary: StarlingX Sudo Configuration File
|
|
Name: sudo-config
|
|
Version: 1.0
|
|
Release: %{tis_patch_ver}%{?_tis_dist}
|
|
License: Apache-2.0
|
|
Group: base
|
|
Packager: StarlingX
|
|
URL: unknown
|
|
|
|
Source0: sysadmin.sudo
|
|
Source1: LICENSE
|
|
|
|
%define SYSADMIN_P 4SuW8cnXFyxsk
|
|
|
|
%description
|
|
StarlingX sudo configuration file
|
|
|
|
%install
|
|
install -d %{buildroot}/%{_sysconfdir}/sudoers.d
|
|
install -m 440 %{SOURCE0} %{buildroot}/%{_sysconfdir}/sudoers.d/sysadmin
|
|
|
|
%pre
|
|
getent group sys_protected >/dev/null || groupadd -f -g 345 sys_protected
|
|
getent passwd sysadmin > /dev/null || \
|
|
useradd -m -g sys_protected -G root \
|
|
-d /home/sysadmin -p %{SYSADMIN_P} \
|
|
-s /bin/sh sysadmin 2> /dev/null || :
|
|
|
|
%files
|
|
%license ../SOURCES/LICENSE
|
|
%config(noreplace) %{_sysconfdir}/sudoers.d/sysadmin
|