-Va:验证所有软件包;

来自: http://man.linuxde.net/rpmverify


-Va:验证所有软件包;
[root@DB ~]# rpmverify -Va
....L.... c /etc/pam.d/fingerprint-auth
....L.... c /etc/pam.d/password-auth
....L.... c /etc/pam.d/smartcard-auth
....L.... c /etc/pam.d/system-auth
.......T. c /etc/inittab
只有校验失败时,才会输出内容:
S= 大小改变
M= 权限改变
5=MD5改变,说明文件内容被改了 : md5sum
L= 连接改变
D= 设备改变
U=用户改变
G= 组改变
T=修改时间改变

查看服务器中有:

# rpmverify -Va
S.5....T. c /etc/salt/minion
Unsatisfied dependencies for php-5.3.3-49.el6.x86_64:
php-cli(x86-64) = 5.3.3-49.el6 is needed by php-5.3.3-49.el6.x86_64
S.5....T. c /root/.bash_profile
..5....T. c /etc/yum/pluginconf.d/fastestmirror.conf
S.5...... /bin/cpio
S.5....T. c /etc/yum.repos.d/epel.repo
Unsatisfied dependencies for httpd-2.2.15-59.el6.centos.x86_64:
httpd-tools = 2.2.15-59.el6.centos is needed by httpd-2.2.15-59.el6.centos.x86_64
Unsatisfied dependencies for drupal7-7.54-1.el6.noarch:
wget is needed by drupal7-7.54-1.el6.noarch
Unsatisfied dependencies for php-xml-5.3.3-49.el6.x86_64:
libexslt.so.0()(64bit) is needed by php-xml-5.3.3-49.el6.x86_64
libxslt.so.1()(64bit) is needed by php-xml-5.3.3-49.el6.x86_64
libxslt.so.1(LIBXML2_1.0.11)(64bit) is needed by php-xml-5.3.3-49.el6.x86_64
libxslt.so.1(LIBXML2_1.0.13)(64bit) is needed by php-xml-5.3.3-49.el6.x86_64
libxslt.so.1(LIBXML2_1.0.18)(64bit) is needed by php-xml-5.3.3-49.el6.x86_64
libxslt.so.1(LIBXML2_1.0.22)(64bit) is needed by php-xml-5.3.3-49.el6.x86_64
libxslt.so.1(LIBXML2_1.0.24)(64bit) is needed by php-xml-5.3.3-49.el6.x86_64
SM5....T. c /etc/ssh/sshd_config
..5...... /usr/lib64/liblzo2.so.2.0.0
..5...... /lib64/libply-splash-core.so.2.0.0
..5...... /lib64/libply.so.2.0.0
..5...... /usr/lib64/libply-boot-client.so.2.0.0
S.5....T. c /etc/zabbix/zabbix_agentd.conf
S.5....T. c /etc/nscd.conf
....L.... c /etc/pam.d/fingerprint-auth
....L.... c /etc/pam.d/password-auth
....L.... c /etc/pam.d/smartcard-auth
....L.... c /etc/pam.d/system-auth
S.5....T. c /etc/security/limits.conf
S.5...... /lib64/libnspr4.so
..5...... /lib64/libplc4.so
..5...... /lib64/libplds4.so
S.5....T. c /etc/yum.conf
S.5....T. c /etc/yum.repos.d/CentOS-Base.repo
S.5....T. c /etc/hosts.deny
S.5....T. c /etc/profile
S.5....T. c /etc/sudoers
S.5....T. c /etc/pam.d/su
S.5....T. c /etc/rc.d/rc.local
SM5....T. /etc/rc.local
S.5....T. c /etc/sysctl.conf

改变权限:M

[root@DB ~]# rpmverify -Vf /bin/touch
[root@DB ~]# rpm -qf /bin/touch
coreutils-8.4-43.el6.x86_64
[root@DB ~]# vim /bin/touch
[root@DB ~]# ll -h /bin/touch
-rwxr-xr-x. 1 root root 47K May 11 2016 /bin/touch
[root@DB ~]# chmod 777 /bin/touch
[root@DB ~]# ll -h /bin/touch
-rwxrwxrwx. 1 root root 47K May 11 2016 /bin/touch
[root@DB ~]# rpmverify -Vf /bin/touch
.M....... /bin/touch

如果恢复权限后:

[root@DB ~]# chmod 755 /bin/touch
[root@DB ~]# ll -h /bin/touch
-rwxr-xr-x. 1 root root 47K May 11 2016 /bin/touch
[root@DB ~]# rpmverify -Vf /bin/touch
#恢复权限后,壮态正常了

如果编辑一个文件,并增加内容,如果修改过来,修改时间就会变化:

[root@DB ~]# rpmverify -Vf /etc/ssh/sshd_config #增加内容
S.5....T. c /etc/ssh/sshd_config
[root@DB ~]# vim /etc/ssh/sshd_config #去掉增加内容
[root@DB ~]# rpmverify -Vf /etc/ssh/sshd_config
.......T. c /etc/ssh/sshd_config
-Va:验证所有软件包;

来自: http://man.linuxde.net/rpmverify

-Va:验证所有软件包;

来自: http://man.linuxde.net/rpmverify

-Va:验证所有软件包;

来自: http://man.linuxde.net/rpmverify

rpmverify命令用来验证已安装的rpm软件包的正确性的更多相关文章

  1. Ubuntu系统下命令行查看自己已安装的桌面环境问题

    原因:有时我们进行远程连接时需要知道我们的Ubuntu系统已安装的桌面环境,这时我们可以使用[dpkg]命令. [dpkg]:dpkg命令是Debian Linux系统用来安装.创建和管理软件包的实用 ...

  2. CentOS6使用第三方yum源安装更多rpm软件包

    引言:       CentOS自带的yum源中rpm包数量有限,很多时候找不到我们需的软件包,(例如:要安装网络连接查看软件iftop,默认设置下无法使用yum命令安装),下面教大家在CentOS ...

  3. 安装zsh后出现命令行无法识别已安装的node

    安装zsh之后,在命令行输入 node -v,会出现 command not found: node. 出现原因是:使用bash输入终端指令识别得是~/.bash_profile,而安装zsh则无法识 ...

  4. SLES 12 SP2 安装src.rpm软件包

      系统型号: SUSE Enterprise  mv systemd-228-117.12.src.rpm   systemd     cd systemd 执行下面的命令解压:     rpm2c ...

  5. linux光盘使用、rpm软件包、yum软件仓库安装使用

    转至:https://blog.51cto.com/zpeng/1532520 一.光盘文件使用 1,RHEL5(x86_64)光盘结构 Cluster              //集群二进制包 C ...

  6. Linux查看系统信息的一些命令及查看已安装软件包的命令

    转自:http://cheneyph.iteye.com/blog/824746 系统 # uname -a # 查看内核/操作系统/CPU信息 # head -n 1 /etc/issue # 查看 ...

  7. (十)Linux查看系统信息的一些命令及查看已安装软件包的命令

    转自:http://cheneyph.iteye.com/blog/824746 系统 # uname -a # 查看内核/操作系统/CPU信息 # head -n 1 /etc/issue # 查看 ...

  8. linux常用命令(查看某些软件是否已安装)

    查看imap是否已安装 rpm -qa | grep imap 以下为未安装的情形: 检查是否已安装sendmail: rpm -qa | grep sendmail 以下为已安装的返回:

  9. Mac下查看已安装的jdk版本及其安装目录

    1.打开终端,输入:/usr/libexec/java_home -V 注意:输入命令参数区分大小写(-v是不对的,必须是-V) 2.如图:为输入命令: 当前Mac已安装jdk目录: Mac默认使用的 ...

随机推荐

  1. django之 文件上传功能(缺陷:无法改存放目录)

    百度云盘:django之 文件上传功能(缺陷:无法改存放目录)

  2. 使用static关键字修饰一个属性

    //使用static关键字修饰一个属性 //static作用: //static:静态 //1.使用static关键字修饰一个属性,声明为static的变量本质就是一个全局变量; //2.静态变量或方 ...

  3. java for语句

    //for语句 public class Test16{ public static void main(String args[]){ for (int i=0;i<10;i+=1){ if ...

  4. weblogic启动报错|unable to create new native threadjava

    问题描述: <-- 上午10时20分01秒 CST> <Critical> <WebLogicServer> <BEA-> <Server sub ...

  5. hihocoder第233周

    题目链接 题目描述 给定一个数组a[N],N小于1e5.把数组划分成若干个片段,每个片段的和都不为0,问有多少种划分方法? 方法描述 定义f(i)表示0~i共有多少种划分方式,则$f(j)=\sum_ ...

  6. 要成为linux网站运维工程师必须要掌握的技能

    要成为linux网站运维工程师必须要掌握的技能 2015-07-27 发表 老男孩点评:感谢此文的作者,写的非常到位,值得入门的初学者认真看看 我是一名linux运维工程师,确切的说是网站运维工程师, ...

  7. C++的iostream标准库介绍+使用详解(转)

    0 为什么需要iostream 我们从一开始就一直在利用C++的输入输出在做着各种练习,输入输出是由iostream库提供的,所以讨论此标准库是有必要的,它与C语言的 stdio库不同,它从一开始就是 ...

  8. ML之监督学习算法之分类算法一 ———— k-近邻算法(最邻近算法)

    一.概述 最近邻规则分类(K-Nearest Neighbor)KNN算法 由Cover 和Hart在1968年提出了最初的邻近算法, 这是一个分类(classification)算法 输入基于实例的 ...

  9. Tensorflow运行程序报错 FailedPreconditionError

    1 FailedPreconditionError错误现象 在运行tensorflow时出现报错,报错语句如下: FailedPreconditionError (see above for trac ...

  10. Redis 的安装与使用(单节点)

    Redis 的安装与使用(单节点)   环境:CentOS 6.5 Redis 版本:redis-3.0 (考虑到Redis3.0 在集群和性能提升方面的特性,rc 版为正式版的候选版,而且 很快就出 ...