소스 검색

debian: do not add user to sudo group, lock root account

The qubes-core-agent-passwordless-root package ships sudo configuration,
adding to sudo group isn't needed.

Basically revert all changes made by qubes-core-agent-passwordless-root
installation.

Fixes QubesOS/qubes-issues#4015
Marek Marczykowski-Górecki 5 년 전
부모
커밋
43fba4e94a
2개의 변경된 파일3개의 추가작업 그리고 1개의 파일을 삭제
  1. 3 0
      debian/qubes-core-agent-passwordless-root.postrm
  2. 0 1
      debian/qubes-core-agent-passwordless-root.preinst

+ 3 - 0
debian/qubes-core-agent-passwordless-root.postrm

@@ -38,6 +38,9 @@ set -e
 
 if [ "${1}" = "remove" ] ; then
     gpasswd -d user sudo
+    if [ "$(passwd -S root|cut -f 2 -d ' ')" = "NP" ]; then
+        passwd -l root
+    fi
 fi
 
 

+ 0 - 1
debian/qubes-core-agent-passwordless-root.preinst

@@ -35,7 +35,6 @@ set -e
 
 if [ "$1" = "install" ] ; then
     usermod -p '' root
-    usermod -a --groups sudo user
 fi
 
 # dh_installdeb will replace this with shell code automatically