forked from pool/system-users
Accepting request 505023 from home:kukuk:sysusers
- Move group trusted into system-user-root package [bsc#1044014] - Move system-user-root into own package - Fix syntax of groups in system-user-root.conf OBS-URL: https://build.opensuse.org/request/show/505023 OBS-URL: https://build.opensuse.org/package/show/Base:System/system-users?expand=0&rev=21
This commit is contained in:
parent
73b672ea93
commit
2a7db287be
@ -1,14 +1,14 @@
|
||||
# Type Name ID GECOS [HOME]
|
||||
# Access to certain kernel and userspace facilities
|
||||
g kmem - - -
|
||||
g lock - - -
|
||||
g tty 5 - -
|
||||
g utmp - - -
|
||||
g kmem - -
|
||||
g lock - -
|
||||
g tty 5 -
|
||||
g utmp - -
|
||||
# Hardware access groups
|
||||
g audio - - -
|
||||
g cdrom - - -
|
||||
g dialout - - -
|
||||
g disk - - -
|
||||
g input - - -
|
||||
g tape - - -
|
||||
g video - - -
|
||||
g audio - -
|
||||
g cdrom - -
|
||||
g dialout - -
|
||||
g disk - -
|
||||
g input - -
|
||||
g tape - -
|
||||
g video - -
|
||||
|
@ -1,2 +0,0 @@
|
||||
# Type Name ID GECOS [HOME]
|
||||
g trusted -
|
@ -1,11 +0,0 @@
|
||||
# Type Name ID GECOS [HOME]
|
||||
|
||||
# The superuser
|
||||
g root 0 - -
|
||||
u root 0 root /root
|
||||
|
||||
# Group owner of /etc/shadow
|
||||
g shadow 15 - -
|
||||
|
||||
# Default group for normal users
|
||||
g users 100 - -
|
@ -1,3 +1,18 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Jun 19 13:18:51 CEST 2017 - kukuk@suse.de
|
||||
|
||||
- Move group trusted into system-user-root package [bsc#1044014]
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Jun 17 12:39:09 CEST 2017 - kukuk@suse.de
|
||||
|
||||
- Move system-user-root into own package
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Jun 9 13:49:26 CEST 2017 - kukuk@suse.de
|
||||
|
||||
- Fix syntax of groups in system-user-root.conf
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Jun 9 11:56:50 CEST 2017 - kukuk@suse.de
|
||||
|
||||
|
@ -17,7 +17,7 @@
|
||||
|
||||
|
||||
Name: system-users
|
||||
Version: 20161020
|
||||
Version: 20170617
|
||||
Release: 0
|
||||
Summary: Provide system accounts
|
||||
License: MIT
|
||||
@ -28,7 +28,6 @@ Source3: system-user-bin.conf
|
||||
Source4: system-user-daemon.conf
|
||||
Source5: system-user-man.conf
|
||||
Source6: system-user-news.conf
|
||||
Source7: system-group-trusted.conf
|
||||
Source8: system-group-obsolete.conf
|
||||
Source9: system-group-hardware.conf
|
||||
Source10: system-group-wheel.conf
|
||||
@ -38,7 +37,7 @@ Source13: system-user-ftp.conf
|
||||
Source14: system-user-lp.conf
|
||||
Source15: system-user-nobody.conf
|
||||
Source16: system-user-upsd.conf
|
||||
Source17: system-user-root.conf
|
||||
BuildRequires: sysuser-shadow
|
||||
BuildRequires: sysuser-tools
|
||||
BuildRequires: pkgconfig(systemd)
|
||||
BuildArch: noarch
|
||||
@ -103,14 +102,6 @@ Group: System/Fhs
|
||||
%description -n system-user-games
|
||||
This package provides the system account and group 'games'.
|
||||
|
||||
%package -n system-group-trusted
|
||||
Summary: System group 'trusted'
|
||||
Group: System/Fhs
|
||||
%{sysusers_requires}
|
||||
|
||||
%description -n system-group-trusted
|
||||
This package provides the system group 'trusted'.
|
||||
|
||||
%package -n system-group-obsolete
|
||||
Summary: Obsolete system groups
|
||||
Group: System/Fhs
|
||||
@ -187,25 +178,6 @@ Requires(pre): group(daemon)
|
||||
This package provides the system account 'upsd'.
|
||||
|
||||
|
||||
#
|
||||
# system user root is special, since we need user root,
|
||||
# group root, shadow and users right from the beginning
|
||||
# before systemd is installable.
|
||||
#
|
||||
|
||||
%package -n system-user-root
|
||||
Summary: System user root
|
||||
Group: System/Fhs
|
||||
Provides: group(root)
|
||||
Provides: group(shadow)
|
||||
Provides: group(users)
|
||||
Provides: user(root)
|
||||
|
||||
%description -n system-user-root
|
||||
This package provides the root account including the groups root,
|
||||
shadow and users.
|
||||
|
||||
|
||||
%prep
|
||||
%setup -q -c -T
|
||||
|
||||
@ -216,7 +188,6 @@ shadow and users.
|
||||
%sysusers_generate_pre %{SOURCE4} daemon
|
||||
%sysusers_generate_pre %{SOURCE5} man
|
||||
%sysusers_generate_pre %{SOURCE6} news
|
||||
%sysusers_generate_pre %{SOURCE7} trusted
|
||||
%sysusers_generate_pre %{SOURCE8} obsolete
|
||||
%sysusers_generate_pre %{SOURCE9} hardware
|
||||
%sysusers_generate_pre %{SOURCE10} wheel
|
||||
@ -244,7 +215,6 @@ install -m 644 %{SOURCE3} %{buildroot}%{_sysusersdir}/system-user-bin.conf
|
||||
install -m 644 %{SOURCE4} %{buildroot}%{_sysusersdir}/system-user-daemon.conf
|
||||
install -m 644 %{SOURCE5} %{buildroot}%{_sysusersdir}/system-user-man.conf
|
||||
install -m 644 %{SOURCE6} %{buildroot}%{_sysusersdir}/system-user-news.conf
|
||||
install -m 644 %{SOURCE7} %{buildroot}%{_sysusersdir}/system-group-trusted.conf
|
||||
install -m 644 %{SOURCE8} %{buildroot}%{_sysusersdir}/system-group-obsolete.conf
|
||||
install -m 644 %{SOURCE9} %{buildroot}%{_sysusersdir}/system-group-hardware.conf
|
||||
install -m 644 %{SOURCE10} %{buildroot}%{_sysusersdir}/system-group-wheel.conf
|
||||
@ -254,7 +224,6 @@ install -m 644 %{SOURCE13} %{buildroot}%{_sysusersdir}/system-user-ftp.conf
|
||||
install -m 644 %{SOURCE14} %{buildroot}%{_sysusersdir}/system-user-lp.conf
|
||||
install -m 644 %{SOURCE15} %{buildroot}%{_sysusersdir}/system-user-nobody.conf
|
||||
install -m 644 %{SOURCE16} %{buildroot}%{_sysusersdir}/system-user-upsd.conf
|
||||
install -m 644 %{SOURCE17} %{buildroot}%{_sysusersdir}/system-user-root.conf
|
||||
|
||||
%pre -n system-user-uucp -f uucp.pre
|
||||
%pre -n system-user-games -f games.pre
|
||||
@ -262,7 +231,6 @@ install -m 644 %{SOURCE17} %{buildroot}%{_sysusersdir}/system-user-root.conf
|
||||
%pre -n system-user-daemon -f daemon.pre
|
||||
%pre -n system-user-man -f man.pre
|
||||
%pre -n system-user-news -f news.pre
|
||||
%pre -n system-group-trusted -f trusted.pre
|
||||
%pre -n system-group-obsolete -f obsolete.pre
|
||||
%pre -n system-group-hardware -f hardware.pre
|
||||
%pre -n system-group-wheel -f wheel.pre
|
||||
@ -275,36 +243,6 @@ install -m 644 %{SOURCE17} %{buildroot}%{_sysusersdir}/system-user-root.conf
|
||||
|
||||
%pre -n system-user-upsd -f upsd.pre
|
||||
|
||||
%pre -n system-user-root -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:\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 -n system-user-root
|
||||
%defattr(-,root,root)
|
||||
%{_sysusersdir}/system-user-root.conf
|
||||
|
||||
%files -n system-user-uucp
|
||||
%defattr(-,root,root)
|
||||
%dir %attr(0750,uucp,uucp) %{_sysconfdir}/uucp
|
||||
@ -333,10 +271,6 @@ end
|
||||
%dir %attr(0750,news,news) %{_sysconfdir}/news
|
||||
%{_sysusersdir}/system-user-news.conf
|
||||
|
||||
%files -n system-group-trusted
|
||||
%defattr(-,root,root)
|
||||
%{_sysusersdir}/system-group-trusted.conf
|
||||
|
||||
%files -n system-group-obsolete
|
||||
%defattr(-,root,root)
|
||||
%{_sysusersdir}/system-group-obsolete.conf
|
||||
|
Loading…
Reference in New Issue
Block a user