Sync from SUSE:SLFO:Main system-user-root revision a536f4fe4d0b0300f992d61fbd6a7f47
This commit is contained in:
commit
7d91ded023
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
## Default LFS
|
||||||
|
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.png filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.zst filter=lfs diff=lfs merge=lfs -text
|
27
system-user-root.changes
Normal file
27
system-user-root.changes
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Feb 4 13:14:06 UTC 2022 - Thorsten Kukuk <kukuk@suse.com>
|
||||||
|
|
||||||
|
- Add /bin/bash as shell for root to sysusers.d config
|
||||||
|
- Add trusted group to sysusers.d config, too.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon May 13 12:38:32 UTC 2019 - Fabian Vogt <fvogt@suse.com>
|
||||||
|
|
||||||
|
- Bump to version 20190513:
|
||||||
|
* Invalidate root password by default (bsc#1134524)
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Jun 21 11:02:42 CEST 2017 - kukuk@suse.de
|
||||||
|
|
||||||
|
- Add some BuildIgnores for bootstrapping
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Jun 19 13:12:37 CEST 2017 - kukuk@suse.de
|
||||||
|
|
||||||
|
- Add group trusted [bsc#1044014]
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Sat Jun 17 12:41:57 CEST 2017 - kukuk@suse.de
|
||||||
|
|
||||||
|
- New package, splitted from system-users
|
||||||
|
|
14
system-user-root.conf
Normal file
14
system-user-root.conf
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
# Type Name ID GECOS HOME SHELL
|
||||||
|
|
||||||
|
# The superuser
|
||||||
|
g root 0 -
|
||||||
|
u root 0 root /root /bin/bash
|
||||||
|
|
||||||
|
# Group owner of /etc/shadow
|
||||||
|
g shadow 15 -
|
||||||
|
|
||||||
|
# Group trusted to avoid cycles with permissions package
|
||||||
|
g trusted 42 -
|
||||||
|
|
||||||
|
# Default group for normal users
|
||||||
|
g users 100 -
|
79
system-user-root.spec
Normal file
79
system-user-root.spec
Normal file
@ -0,0 +1,79 @@
|
|||||||
|
#
|
||||||
|
# spec file for package system-user-root
|
||||||
|
#
|
||||||
|
# Copyright (c) 2022 SUSE LLC
|
||||||
|
#
|
||||||
|
# All modifications and additions to the file contributed by third parties
|
||||||
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
|
# upon. The license for this file, and modifications and additions to the
|
||||||
|
# file, is the same license as for the pristine package itself (unless the
|
||||||
|
# license for the pristine package is not an Open Source License, in which
|
||||||
|
# case the license is the MIT License). An "Open Source License" is a
|
||||||
|
# license that conforms to the Open Source Definition (Version 1.9)
|
||||||
|
# published by the Open Source Initiative.
|
||||||
|
|
||||||
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||||
|
#
|
||||||
|
|
||||||
|
|
||||||
|
Name: system-user-root
|
||||||
|
Version: 20190513
|
||||||
|
Release: 0
|
||||||
|
Summary: System user and group root
|
||||||
|
License: MIT
|
||||||
|
Group: System/Fhs
|
||||||
|
Source1: system-user-root.conf
|
||||||
|
BuildArch: noarch
|
||||||
|
Provides: group(root)
|
||||||
|
Provides: group(shadow)
|
||||||
|
Provides: group(trusted)
|
||||||
|
Provides: group(users)
|
||||||
|
Provides: user(root)
|
||||||
|
#!BuildIgnore: group(root)
|
||||||
|
#!BuildIgnore: group(trusted)
|
||||||
|
#!BuildIgnore: user(root)
|
||||||
|
|
||||||
|
%description
|
||||||
|
This package provides the root account including the groups root,
|
||||||
|
shadow and users.
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%setup -q -c -T
|
||||||
|
|
||||||
|
%build
|
||||||
|
|
||||||
|
%install
|
||||||
|
mkdir -p %{buildroot}%{_sysusersdir}
|
||||||
|
install -m 644 %{SOURCE1} %{buildroot}%{_sysusersdir}/system-user-root.conf
|
||||||
|
|
||||||
|
%pre -p <lua>
|
||||||
|
if not posix.access("/etc", "f") then
|
||||||
|
posix.mkdir("/etc")
|
||||||
|
end
|
||||||
|
if not posix.access("/etc/passwd", "f") then
|
||||||
|
file = io.open("/etc/passwd", "a+")
|
||||||
|
file:write("root:x:0:0:root:/root:/bin/bash\n")
|
||||||
|
file:close()
|
||||||
|
posix.chmod("/etc/passwd", 0644)
|
||||||
|
end
|
||||||
|
if not posix.access("/etc/group", "f") then
|
||||||
|
file = io.open("/etc/group", "a+")
|
||||||
|
file:write("root:x:0:\nshadow:x:15:\ntrusted:x:42:\nusers:x:100:\n")
|
||||||
|
file:close()
|
||||||
|
posix.chmod("/etc/group", 0644)
|
||||||
|
end
|
||||||
|
if not posix.access("/etc/shadow", "f") then
|
||||||
|
file = io.open("/etc/shadow", "a+")
|
||||||
|
local date = os.time()
|
||||||
|
date = math.floor(date / 86400)
|
||||||
|
file:write("root:*:", date, "::::::\n")
|
||||||
|
file:close()
|
||||||
|
posix.chown("/etc/shadow", 0, 15)
|
||||||
|
posix.chmod("/etc/shadow", 0640)
|
||||||
|
end
|
||||||
|
|
||||||
|
%files
|
||||||
|
%defattr(-,root,root)
|
||||||
|
%{_sysusersdir}/system-user-root.conf
|
||||||
|
|
||||||
|
%changelog
|
Loading…
Reference in New Issue
Block a user