Server IP : 85.214.239.14 / Your IP : 3.145.42.1 Web Server : Apache/2.4.62 (Debian) System : Linux h2886529.stratoserver.net 4.9.0 #1 SMP Tue Jan 9 19:45:01 MSK 2024 x86_64 User : www-data ( 33) PHP Version : 7.4.18 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare, MySQL : OFF | cURL : OFF | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : OFF Directory : /proc/2/root/proc/2/root/proc/2/cwd/proc/2/root/var/lib/dpkg/info/ |
Upload File : |
#!/bin/sh set -e check_password() { if [ ! "$SUDO_FORCE_REMOVE" = "yes" ]; then # let's check whether the root account is locked. # if it is, we're not going another step. No Sirreee! passwd=$(getent shadow root|cut -f2 -d:) passwd1=$(echo "$passwd" |cut -c1) # Note: we do need the 'xfoo' syntax here, since POSIX special-cases # the $passwd value '!' as negation. # bug #1001858 causes trouble here. In autopkgtest, the system # might be switching back and forth between sudo and sudo-ldap # without having a root password set. # autopkgtest environment is not under our control, so we cannot # disable this test just for autopkgtest (it's autopkgtest itself # installing packages). if [ "x$passwd" = "x*" ] || [ "x$passwd1" = "x!" ]; then # yup, password is locked echo "You have asked that the sudo package be removed," echo "but no root password has been set." echo "Without sudo, you may not be able to gain administrative privileges." echo echo "If you would prefer to access the root account with su(1)" echo "or by logging in directly," echo "you must set a root password with \"sudo passwd\"." echo echo "If you have arranged other means to access the root account," echo "and you are sure this is what you want," echo "you may bypass this check by setting an environment variable " echo "(export SUDO_FORCE_REMOVE=yes)." echo echo "Refusing to remove sudo." exit 1 fi fi } case $1 in remove) check_password; ;; *) ;; esac # Automatically added by dh_installinit/13.11.4 if [ -z "${DPKG_ROOT:-}" ] && [ "$1" = remove ] && [ -x "/etc/init.d/sudo" ] ; then invoke-rc.d --skip-systemd-native sudo stop || exit 1 fi # End automatically added section exit 0