vickycq 写了:spreadtrum 写了:以下一个.sh文件会不会是这个有影响chattr +i /etc/sudoers
是的。/etc/sudoers 被赐予免死金牌 (immutable)
需要设法执行 chattr -i /etc/sudoers
如果 root 都不能 chattr -i 只好动用 RecoveryMode 或单用户模式
root下执行chattr -i /etc/sudoers,没有报错
root@test:~# chattr -i /etc/sudoers
root@test:~# apt-get dist-upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages were automatically installed and are no longer required:
fcitx-libs-gclient libgif4 libgnome-desktop-2-17 libmono-web4.0-cil
linux-headers-3.13.0-32 linux-headers-3.13.0-32-generic
linux-image-3.13.0-32-generic linux-image-extra-3.13.0-32-generic
Use 'apt autoremove' to remove them.
The following NEW packages will be installed:
libcgi-fast-perl libcgi-pm-perl libfcgi-perl
The following packages will be upgraded:
libparse-debianchangelog-perl
1 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
2 not fully installed or removed.
Need to get 278 kB of archives.
After this operation, 604 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1
http://mirrors.zju.edu.cn/ubuntu xenial/main amd64 libcgi-pm-perl all 4.26-1 [185 kB]
Get:2
http://mirrors.zju.edu.cn/ubuntu xenial/main amd64 libfcgi-perl amd64 0.77-1build1 [32.3 kB]
Get:3
http://mirrors.zju.edu.cn/ubuntu xenial/main amd64 libcgi-fast-perl all 1:2.10-1 [10.2 kB]
Get:4
http://mirrors.zju.edu.cn/ubuntu xenial/main amd64 libparse-debianchangelog-perl all 1.2.0-8 [50.4 kB]
Fetched 278 kB in 0s (381 kB/s)
Selecting previously unselected package libcgi-pm-perl.
(Reading database ... 252668 files and directories currently installed.)
Preparing to unpack .../libcgi-pm-perl_4.26-1_all.deb ...
Unpacking libcgi-pm-perl (4.26-1) ...
Selecting previously unselected package libfcgi-perl.
Preparing to unpack .../libfcgi-perl_0.77-1build1_amd64.deb ...
Unpacking libfcgi-perl (0.77-1build1) ...
Selecting previously unselected package libcgi-fast-perl.
Preparing to unpack .../libcgi-fast-perl_1%3a2.10-1_all.deb ...
Unpacking libcgi-fast-perl (1:2.10-1) ...
Preparing to unpack .../libparse-debianchangelog-perl_1.2.0-8_all.deb ...
Unpacking libparse-debianchangelog-perl (1.2.0-8) over (1.2.0-1ubuntu1) ...
Processing triggers for man-db (2.7.5-1) ...
Setting up sudo (1.8.16-0ubuntu1.1) ...
Removing obsolete conffile /etc/init.d/sudo ...
Setting up ubuntu-minimal (1.361) ...
Setting up libcgi-pm-perl (4.26-1) ...
Setting up libfcgi-perl (0.77-1build1) ...
Setting up libcgi-fast-perl (1:2.10-1) ...
Setting up libparse-debianchangelog-perl (1.2.0-8) ...
root@test:~#
更新完成
BTW,啥叫免死金牌