目录
2.2、chapsswd:无法打开 /etc/passwd 信息提示
一、/etc 目录
[user@localhost etc]$ ll
total 1500
drwxr-xr-x. 3 root root 97 Dec 7 18:48 abrt
-rw-r--r--. 1 root root 16 Dec 7 17:52 adjtime
-rw-r--r--. 1 root root 1529 Mar 31 2020 aliases
-rw-r--r--. 1 root root 12288 Dec 7 18:51 aliases.db
drwxr-xr-x. 3 root root 62 Dec 7 18:50 alsa
drwxr-xr-x. 2 root root 4096 Dec 7 18:52 alternatives
-rw-------. 1 root root 541 Aug 8 2019 anacrontab
-rw-r--r--. 1 root root 55 Aug 8 2019 asound.conf
-rw-r--r--. 1 root root 1 Oct 30 2018 at.deny
drwxr-x---. 3 root root 41 Dec 7 18:48 audisp
drwxr-x---. 3 root root 102 Dec 7 18:48 audit
-rw-r--r--. 1 root root 15137 Sep 30 08:48 autofs.conf
-rw-------. 1 root root 232 Sep 30 08:48 autofs_ldap_auth.conf
-rw-r--r--. 1 root root 795 Sep 30 08:48 auto.master
drwxr-xr-x. 2 root root 6 Sep 30 08:48 auto.master.d
-rw-r--r--. 1 root root 524 Sep 30 08:48 auto.misc
-rwxr-xr-x. 1 root root 1260 Sep 30 08:48 auto.net
-rwxr-xr-x. 1 root root 687 Sep 30 08:48 auto.smb
drwxr-xr-x. 4 root root 94 Dec 7 18:51 avahi
drwxr-xr-x. 2 root root 4096 Dec 7 18:51 bash_completion.d
-rw-r--r--. 1 root root 2853 Mar 31 2020 bashrc
drwxr-xr-x. 2 root root 6 Nov 16 08:46 binfmt.d
drwxr-xr-x. 2 root root 22 Dec 7 18:48 bluetooth
drwxr-xr-x. 2 root root 12288 Dec 7 18:48 brltty
-rw-r--r--. 1 root root 21929 Apr 10 2018 brltty.conf
-rw-r--r--. 1 root root 37 Nov 23 07:08 centos-release
-rw-r--r--. 1 root root 51 Nov 23 07:08 centos-release-upstream
drwxr-xr-x. 2 root root 28 Dec 7 18:48 certmonger
-rw-r--r--. 1 root root 676 Aug 8 2019 cgconfig.conf
drwxr-xr-x. 2 root root 6 Aug 8 2019 cgconfig.d
-rw-r--r--. 1 root root 265 Dec 7 17:48 cgrules.conf
-rw-r--r--. 1 root root 131 Aug 8 2019 cgsnapshot_blacklist.conf
drwxr-xr-x. 2 root root 6 Oct 13 08:46 chkconfig.d
-rw-r--r--. 1 root root 1108 Aug 8 2019 chrony.conf
-rw-r-----. 1 root chrony 62 Dec 7 17:52 chrony.keys
-rw-r-----. 1 root chrony 481 Aug 8 2019 chrony.keys.rpmnew
drwxr-xr-x. 2 root root 25 Dec 7 18:50 cifs-utils
drwxr-xr-x. 2 root root 51 Dec 7 18:50 cron.d
drwxr-xr-x. 2 root root 54 Dec 7 18:51 cron.daily
-rw-------. 1 root root 0 Aug 8 2019 cron.deny
drwxr-xr-x. 2 root root 21 Dec 7 18:51 cron.hourly
drwxr-xr-x. 2 root root 6 Jun 9 2014 cron.monthly
-rw-r--r--. 1 root root 451 Jun 9 2014 crontab
drwxr-xr-x. 2 root root 6 Jun 9 2014 cron.weekly
-rw-------. 1 root root 0 Dec 7 17:42 crypttab
-rw-r--r--. 1 root root 1620 Mar 31 2020 csh.cshrc
-rw-r--r--. 1 root root 1103 Mar 31 2020 csh.login
drwxr-xr-x. 5 root lp 4096 Dec 7 21:51 cups
drwxr-xr-x. 2 root root 33 Dec 7 18:49 cupshelpers
drwxr-xr-x. 4 root root 74 Dec 7 18:47 dbus-1
drwxr-xr-x. 4 root root 29 Nov 2 2018 dconf
drwxr-xr-x. 2 root root 41 Dec 7 18:50 default
drwxr-xr-x. 2 root root 22 Dec 7 18:47 depmod.d
drwxr-x---. 4 root root 51 Dec 7 18:48 dhcp
-rw-r--r--. 1 root root 5090 Nov 16 06:40 DIR_COLORS
-rw-r--r--. 1 root root 5725 Nov 16 06:40 DIR_COLORS.256color
-rw-r--r--. 1 root root 4669 Nov 16 06:40 DIR_COLORS.lightbgcolor
-rw-r--r--. 1 root root 1174 Apr 10 2018 dleyna-server-service.conf
-rw-r--r--. 1 root root 26832 Oct 13 08:46 dnsmasq.conf
drwxr-xr-x. 2 root root 6 Oct 13 08:46 dnsmasq.d
-rw-r--r--. 1 root root 1285 Sep 30 08:57 dracut.conf
drwxr-xr-x. 2 root root 55 Dec 7 18:48 dracut.conf.d
-rw-r--r--. 1 root root 112 Sep 30 06:21 e2fsck.conf
drwxr-xr-x. 3 root root 36 Dec 7 18:48 egl
-rw-r--r--. 1 root root 4760 Aug 8 2019 enscript.cfg
-rw-r--r--. 1 root root 0 Mar 31 2020 environment
-rw-r--r--. 1 root root 1317 Apr 10 2018 ethertypes
-rw-r--r--. 1 root root 0 Jun 7 2013 exports
drwxr-xr-x. 2 root root 6 Sep 30 10:10 exports.d
lrwxrwxrwx. 1 root root 56 Dec 7 17:44 favicon.png -> /usr/share/icons/hicolor/16x16/apps/fedora-logo-icon.png
drwxr-xr-x. 2 root root 21 Dec 7 18:49 fcoe
drwxr-xr-x. 2 root root 44 Dec 7 17:46 festival
-rw-r--r--. 1 root root 70 Mar 31 2020 filesystems
drwxr-xr-x. 3 root root 17 Dec 7 18:50 firefox
drwxr-x---. 7 root root 4096 Dec 7 18:48 firewalld
drwxr-xr-x. 3 root root 22 Dec 7 18:49 flatpak
drwxr-xr-x. 3 root root 36 Dec 7 18:45 fonts
-rw-r--r--. 1 root root 20 Oct 30 2018 fprintd.conf
-rw-r--r--. 1 root root 501 Dec 7 17:42 fstab
-rw-r--r--. 1 root root 38 Oct 30 2018 fuse.conf
drwxr-xr-x. 3 root root 56 Dec 7 18:49 fwupd
drwxr-xr-x. 7 root root 102 Dec 7 17:45 gconf
drwxr-xr-x. 2 root root 6 Aug 2 2017 gcrypt
-rw-r--r--. 1 root root 265 Sep 30 06:23 gdbinit
drwxr-xr-x. 2 root root 6 Sep 30 06:23 gdbinit.d
drwxr-xr-x. 6 root root 101 Dec 7 18:49 gdm
drwxr-xr-x. 2 root root 25 Dec 7 18:48 geoclue
-rw-r--r--. 1 root root 1704 Aug 12 2019 GeoIP.conf
drwxr-xr-x. 2 root root 6 Dec 7 18:51 ghostscript
drwxr-xr-x. 3 root root 25 Dec 7 18:48 glvnd
drwxr-xr-x. 2 root root 6 Jul 13 2018 gnupg
-rw-r--r--. 1 root root 94 Mar 24 2017 GREP_COLORS
drwxr-xr-x. 4 root root 38 Dec 7 17:44 groff
-rw-r--r--. 1 root root 1019 Dec 7 18:49 group
-rw-r--r--. 1 root root 1019 Dec 7 18:49 group-
lrwxrwxrwx. 1 root root 22 Dec 7 18:48 grub2.cfg -> ../boot/grub2/grub.cfg
drwx------. 2 root root 4096 Dec 7 18:48 grub.d
----------. 1 root root 821 Dec 7 18:48 gshadow
----------. 1 root root 809 Dec 7 18:48 gshadow-
drwxr-xr-x. 3 root root 19 Sep 30 09:51 gss
drwxr-xr-x. 2 root root 76 Dec 7 18:49 gssproxy
-rw-r--r--. 1 root root 871 Dec 7 17:45 hba.conf
-rw-r--r--. 1 root root 9 Jun 7 2013 host.conf
-rw-r--r--. 1 root root 22 Dec 7 17:52 hostname
-rw-r--r--. 1 root root 158 Jun 7 2013 hosts
-rw-r--r--. 1 root root 370 Jun 7 2013 hosts.allow
-rw-r--r--. 1 root root 460 Jun 7 2013 hosts.deny
drwxr-xr-x. 2 root root 23 Dec 7 18:48 hp
-rw-r--r--. 1 root root 4849 Apr 10 2018 idmapd.conf
lrwxrwxrwx. 1 root root 11 Dec 7 18:45 init.d -> rc.d/init.d
-rw-r--r--. 1 root root 511 Nov 16 08:20 inittab
-rw-r--r--. 1 root root 942 Jun 7 2013 inputrc
drwxr-xr-x. 3 root root 18 Dec 7 18:51 ipa
drwxr-xr-x. 2 root root 4096 Dec 7 18:46 iproute2
-rw-r--r--. 1 root root 1073 Aug 6 10:18 ipsec.conf
drwx------. 3 root root 66 Dec 7 18:51 ipsec.d
-rw-------. 1 root root 31 Aug 6 10:18 ipsec.secrets
drwxr-xr-x. 2 root root 50 Dec 7 18:48 iscsi
-rw-r--r--. 1 root root 23 Nov 23 07:08 issue
-rw-r--r--. 1 root root 22 Nov 23 07:08 issue.net
drwxr-xr-x. 3 root root 59 Dec 7 17:44 java
drwxr-xr-x. 2 root root 6 Nov 20 2015 jvm
drwxr-xr-x. 2 root root 6 Nov 20 2015 jvm-commmon
-rw-r--r--. 1 root root 7274 Dec 7 18:48 kdump.conf
drwxr-xr-x. 3 root root 23 Dec 7 17:48 kernel
-rw-r--r--. 1 root root 646 Sep 30 06:21 krb5.conf
drwxr-xr-x. 2 root root 6 Sep 30 09:51 krb5.conf.d
-rw-r--r--. 1 root root 478 Sep 30 06:22 ksmtuned.conf
-rw-r--r--. 1 root root 85800 Dec 7 18:52 ld.so.cache
-rw-r--r--. 1 root root 28 Feb 27 2013 ld.so.conf
drwxr-xr-x. 2 root root 4096 Dec 7 18:48 ld.so.conf.d
-rw-r-----. 1 root root 191 Mar 1 2019 libaudit.conf
drwxr-xr-x. 3 root root 19 Dec 7 18:48 libblockdev
drwxr-xr-x. 2 root root 4096 Dec 7 18:48 libibverbs.d
drwxr-xr-x. 2 root root 33 Dec 7 18:45 libnl
drwxr-xr-x. 2 root root 6 Sep 30 09:48 libpaper.d
drwxr-xr-x. 6 root root 4096 Dec 7 18:48 libreport
-rw-r--r--. 1 root root 2388 Dec 7 17:52 libuser.conf
drwx------. 5 root root 4096 Dec 7 18:51 libvirt
-rw-r--r--. 1 root root 19 Dec 7 17:52 locale.conf
lrwxrwxrwx. 1 root root 41 Dec 7 17:52 localtime -> ../usr/share/zoneinfo/America/Los_Angeles
-rw-r--r--. 1 root root 2043 Dec 7 17:52 login.defs
-rw-r--r--. 1 root root 2027 Aug 6 2019 login.defs.rpmnew
-rw-r--r--. 1 root root 662 Jul 31 2013 logrotate.conf
drwxr-xr-x. 2 root root 4096 Dec 7 18:51 logrotate.d
drwxr-xr-x. 3 root root 41 Dec 7 18:48 lsm
drwxr-xr-x. 6 root root 94 Dec 7 18:48 lvm
-r--r--r--. 1 root root 33 Dec 7 17:45 machine-id
-rw-r--r--. 1 root root 111 Sep 30 09:07 magic
-rw-r--r--. 1 root root 1968 Apr 11 2018 mail.rc
-rw-r--r--. 1 root root 5122 Nov 16 08:20 makedumpfile.conf.sample
-rw-r--r--. 1 root root 5171 Oct 30 2018 man_db.conf
drwxr-xr-x. 2 root root 6 Nov 20 2015 maven
-rw-r--r--. 1 root root 1106 Sep 30 08:58 mke2fs.conf
drwxr-xr-x. 2 root root 4096 Dec 7 18:50 modprobe.d
drwxr-xr-x. 2 root root 6 Nov 16 08:46 modules-load.d
-rw-r--r--. 1 root root 0 Jun 7 2013 motd
lrwxrwxrwx. 1 root root 17 Dec 7 17:42 mtab -> /proc/self/mounts
-rw-r--r--. 1 root root 2620 Jun 10 2014 mtools.conf
drwxr-xr-x. 2 root root 6 Nov 16 08:12 multipath
-rw-r--r--. 1 root root 570 Sep 30 06:21 my.cnf
drwxr-xr-x. 2 root root 30 Dec 7 18:46 my.cnf.d
-rw-r--r--. 1 root root 8892 Jun 9 2014 nanorc
drwxr-xr-x. 3 root root 36 Dec 7 18:48 ndctl
-rw-r--r--. 1 root root 767 Aug 8 2019 netconfig
drwxr-xr-x. 8 root root 4096 Oct 1 09:28 NetworkManager
-rw-r--r--. 1 root root 58 Nov 16 08:20 networks
-rw-r--r--. 1 root root 1023 Sep 30 10:10 nfs.conf
-rw-r--r--. 1 root root 3391 Sep 30 10:10 nfsmount.conf
-rw-r--r--. 1 root root 1721 Dec 7 17:52 nsswitch.conf
-rw-r--r--. 1 root root 1726 Oct 22 2012 nsswitch.conf.bak
-rw-r--r--. 1 root root 1938 Sep 29 18:51 nsswitch.conf.rpmnew
drwxr-xr-x. 3 root root 49 Dec 7 18:49 ntp
-rw-r--r--. 1 root root 2000 Nov 27 2019 ntp.conf
-rw-r--r--. 1 root root 91 Dec 3 2012 numad.conf
drwxr-xr-x. 2 root root 6 Mar 5 2015 oddjob
-rw-r--r--. 1 root root 4922 Mar 5 2015 oddjobd.conf
drwxr-xr-x. 2 root root 68 Dec 7 17:45 oddjobd.conf.d
drwxr-xr-x. 3 root root 34 Sep 30 10:17 openldap
drwxr-xr-x. 2 root root 6 Apr 10 2018 opt
lrwxrwxrwx. 1 root root 21 Dec 7 18:44 os-release -> ../usr/lib/os-release
drwxr-xr-x. 2 root root 88 Dec 7 18:50 PackageKit
drwxr-xr-x. 2 root root 4096 Dec 7 18:51 pam.d
-rw-r--r--. 1 root root 68 Sep 30 09:48 papersize
-rw-r--r--. 1 root root 2450 Dec 7 18:48 passwd
-rw-r--r--. 1 root root 2387 Dec 7 18:48 passwd-
-rw-r--r--. 1 root root 1362 Jun 9 2014 pbm2ppa.conf
-rw-r--r--. 1 root root 2872 Jun 9 2014 pinforc
drwxr-xr-x. 3 root root 20 Aug 4 2017 pkcs11
drwxr-xr-x. 12 root root 4096 Dec 7 18:49 pki
drwxr-xr-x. 2 root root 27 Oct 1 09:53 plymouth
drwxr-xr-x. 5 root root 49 Apr 10 2018 pm
-rw-r--r--. 1 root root 6300 Jun 9 2014 pnm2ppa.conf
drwxr-xr-x. 5 root root 69 Mar 31 2020 polkit-1
drwxr-xr-x. 2 root root 6 Jun 9 2014 popt.d
drwxr-xr-x. 2 root root 4096 Dec 7 18:51 postfix
drwxr-xr-x. 3 root root 4096 Dec 7 18:48 ppp
drwxr-xr-x. 2 root root 101 Dec 7 18:48 prelink.conf.d
-rw-r--r--. 1 root root 233 Jun 7 2013 printcap
-rw-r--r--. 1 root root 1819 Mar 31 2020 profile
drwxr-xr-x. 2 root root 4096 Dec 7 18:50 profile.d
-rw-r--r--. 1 root root 6545 Mar 31 2020 protocols
drwxr-xr-x. 2 root root 75 Dec 7 18:48 pulse
drwxr-xr-x. 2 root root 22 Dec 7 18:50 purple
drwxr-xr-x. 2 root root 34 Dec 7 18:45 python
drwxr-xr-x. 3 root root 48 Dec 7 18:51 qemu-ga
drwxr-xr-x. 2 root root 49 Dec 7 18:49 qemu-kvm
-rw-r--r--. 1 root root 433 Oct 30 2018 radvd.conf
lrwxrwxrwx. 1 root root 10 Dec 7 18:45 rc0.d -> rc.d/rc0.d
lrwxrwxrwx. 1 root root 10 Dec 7 18:45 rc1.d -> rc.d/rc1.d
lrwxrwxrwx. 1 root root 10 Dec 7 18:45 rc2.d -> rc.d/rc2.d
lrwxrwxrwx. 1 root root 10 Dec 7 18:45 rc3.d -> rc.d/rc3.d
lrwxrwxrwx. 1 root root 10 Dec 7 18:45 rc4.d -> rc.d/rc4.d
lrwxrwxrwx. 1 root root 10 Dec 7 18:45 rc5.d -> rc.d/rc5.d
lrwxrwxrwx. 1 root root 10 Dec 7 18:45 rc6.d -> rc.d/rc6.d
drwxr-xr-x. 10 root root 4096 Dec 7 18:47 rc.d
lrwxrwxrwx. 1 root root 13 Dec 7 18:47 rc.local -> rc.d/rc.local
drwxr-xr-x. 3 root root 89 Dec 7 18:48 rdma
lrwxrwxrwx. 1 root root 14 Dec 7 18:44 redhat-release -> centos-release
-rw-r--r--. 1 root root 1787 Jun 9 2014 request-key.conf
drwxr-xr-x. 2 root root 74 Dec 7 18:50 request-key.d
-rw-r--r--. 1 root root 73 Dec 7 18:55 resolv.conf
-rw-r--r--. 1 root root 1634 Dec 24 2012 rpc
drwxr-xr-x. 2 root root 4096 Sep 30 10:29 rpm
-rw-r--r--. 1 root root 458 Mar 31 2020 rsyncd.conf
-rw-r--r--. 1 root root 3232 Sep 30 06:19 rsyslog.conf
drwxr-xr-x. 2 root root 24 Dec 7 18:51 rsyslog.d
-rw-r--r--. 1 root root 1008 Nov 16 08:20 rwtab
drwxr-xr-x. 2 root root 48 Dec 7 18:49 rwtab.d
drwxr-xr-x. 2 root root 58 Dec 7 18:48 samba
drwxr-xr-x. 3 root root 4096 Dec 7 18:48 sane.d
drwxr-xr-x. 2 root root 62 Dec 7 18:51 sasl2
drwxr-xr-x. 3 root root 32 Dec 7 18:47 scl
-rw-------. 1 root root 221 Mar 31 2020 securetty
drwxr-xr-x. 6 root root 4096 Dec 7 18:45 security
drwxr-xr-x. 5 root root 76 Dec 7 18:48 selinux
-rw-r--r--. 1 root root 670293 Jun 7 2013 services
-rw-r--r--. 1 root root 216 Mar 31 2020 sestatus.conf
drwxr-xr-x. 2 root root 32 Dec 7 18:49 setroubleshoot
drwxr-xr-x. 2 root root 4096 Dec 7 17:48 setuptool.d
drwxr-xr-x. 3 root root 20 Dec 7 17:44 sgml
----------. 1 root root 1186 Dec 7 18:48 shadow
----------. 1 root root 1163 Dec 7 18:48 shadow-
-rw-r--r--. 1 root root 95 Dec 7 17:49 shells
-rw-r--r--. 1 root root 44 Mar 31 2020 shells.rpmnew
drwxr-xr-x. 3 root root 74 Dec 7 18:45 skel
drwxr-xr-x. 3 root root 71 Dec 7 18:51 smartmontools
-rw-r--r--. 1 root root 138 Oct 13 09:11 sos.conf
drwxr-xr-x. 4 root root 53 Dec 7 17:47 speech-dispatcher
drwxr-xr-x. 2 root root 4096 Dec 7 18:50 ssh
drwxr-xr-x. 2 root root 18 Dec 7 18:45 ssl
drwx--x--x. 3 sssd sssd 19 Dec 7 18:48 sssd
-rw-r--r--. 1 root root 212 Nov 16 08:20 statetab
drwxr-xr-x. 2 root root 6 Nov 16 08:20 statetab.d
-rw-r--r--. 1 root root 0 Mar 31 2020 subgid
-rw-r--r--. 1 root root 0 Mar 31 2020 subuid
-rw-r-----. 1 root root 1786 Sep 30 06:18 sudo.conf
-r--r-----. 1 root root 4328 Sep 30 06:18 sudoers
drwxr-x---. 2 root root 6 Sep 30 10:42 sudoers.d
-rw-r-----. 1 root root 3181 Sep 30 06:18 sudo-ldap.conf
drwxr-xr-x. 6 root root 4096 Dec 7 18:51 sysconfig
-rw-r--r--. 1 root root 449 Nov 16 08:20 sysctl.conf
drwxr-xr-x. 2 root root 27 Dec 7 18:48 sysctl.d
drwxr-xr-x. 4 root root 4096 Dec 7 18:47 systemd
lrwxrwxrwx. 1 root root 14 Dec 7 18:44 system-release -> centos-release
-rw-r--r--. 1 root root 23 Nov 23 07:08 system-release-cpe
drwxr-xr-x. 4 root root 28 Dec 7 18:50 target
-rw-------. 1 tss tss 7046 Aug 3 2017 tcsd.conf
drwxr-xr-x. 2 root root 6 Sep 6 2017 terminfo
drwxr-xr-x. 2 root root 6 Dec 7 18:51 tmpfiles.d
-rw-r--r--. 1 root root 750 Nov 16 08:20 trusted-key.key
drwxr-xr-x. 3 root root 104 Dec 7 18:50 tuned
drwxr-xr-x. 3 root root 51 Dec 7 18:55 udev
drwxr-xr-x. 2 root root 25 Dec 7 18:49 udisks2
drwxr-xr-x. 2 root root 65 Dec 7 18:48 unbound
-rw-r--r--. 1 root root 557 Apr 10 2018 updatedb.conf
drwxr-xr-x. 2 root root 24 Dec 7 18:48 UPower
-rw-r--r--. 1 root root 1523 Apr 10 2018 usb_modeswitch.conf
-rw-r--r--. 1 root root 37 Dec 7 17:52 vconsole.conf
-rw-r--r--. 1 root root 1982 Oct 13 09:13 vimrc
-rw-r--r--. 1 root root 1982 Oct 13 09:13 virc
drwxr-xr-x. 4 root root 4096 Dec 7 18:51 vmware-tools
-rw-r--r--. 1 root root 4479 May 15 2019 wgetrc
drwxr-xr-x. 2 root root 32 Dec 7 18:48 wpa_supplicant
-rw-r--r--. 1 root root 0 Jun 9 2014 wvdial.conf
drwxr-xr-x. 6 root root 97 Dec 7 18:46 X11
drwxr-xr-x. 5 root root 94 Dec 7 18:46 xdg
drwxr-xr-x. 2 root root 6 Apr 10 2018 xinetd.d
drwxr-xr-x. 2 root root 20 Dec 7 17:44 xml
drwxr-xr-x. 6 root root 95 Dec 7 18:51 yum
-rw-r--r--. 1 root root 970 Oct 1 10:03 yum.conf
drwxr-xr-x. 2 root root 4096 Oct 1 10:03 yum.repos.d
二、chpasswd:无法打开 /etc/passwd
2.1、chattr -i 保护命令行
chattr -i 保护
[root@localhost sbin]# chattr -i /etc/passwd
[root@localhost sbin]# chattr -i /etc/group
[root@localhost sbin]# chattr -i /etc/gshadow
[root@localhost sbin]# chattr -i /etc/shadow
[root@localhost sbin]# chattr +i /etc/passwd
[root@localhost sbin]# chattr +i /etc/group
[root@localhost sbin]# chattr +i /etc/gshadow
[root@localhost sbin]# chattr +i /etc/shadow
2.2、chapsswd:无法打开 /etc/passwd 信息提示
查看 /etc/passwd 信息
[root@localhost TEST]# ls -l /etc/passwd
-rw-r--r--. 1 root root 3372 12月 6 19:23 /etc/passwd
第0位(-) 文件类型
第1、2、3位(rw-) 属主权限
第4、5、6位(r--) 属组权限
第7、8、9位(r--) 其他用户权限
1 标识号
root 用户名
root 属组名
3372 文件大小
12月 6 19:25 当前时间
/etc/passwd 文件名
r:4
w:2
X:1
-:0
rw- =4+2+0
r-- =4+0+0
r-- =4+0+0
CentOS7.2系统装在VMware中,开启不了,创新安装了一个,这个问题已解决。