dd操作数据文件

1.dd主要参数

       Copy a file, converting and formatting according to the operands.

       bs=BYTES
              force ibs=BYTES and obs=BYTES

       cbs=BYTES
              convert BYTES bytes at a time

       count=BLOCKS
              copy only BLOCKS input blocks

       ibs=BYTES
              read BYTES bytes at a time

       if=FILE
              read from FILE instead of stdin

       obs=BYTES
              write BYTES bytes at a time

       of=FILE
              write to FILE instead of stdout

       seek=BLOCKS
              skip BLOCKS obs-sized blocks at start of output

       skip=BLOCKS
              skip BLOCKS ibs-sized blocks at start of input

2.拷贝数据文件头部

[oracle@node1 chf]$ dd if=system01.dbf of=/tmp/dd_xifenfei01.dbf bs=8192 count=1
1+0 records in
1+0 records out
8192 bytes (8.2 kB) copied, 6.2e-05 seconds, 132 MB/s
[oracle@node1 chf]$ ll /tmp/dd_xifenfei01.dbf
-rw-r--r-- 1 oracle oinstall 8192 01-13 16:49 /tmp/dd_xifenfei01.dbf


BBED> set filename '/tmp/dd_xifenfei01.dbf'
        FILENAME        /tmp/dd_xifenfei01.dbf

BBED> set block 1
        BLOCK#          1

BBED> dump
 File: ././dd_xifenfei01.dbf (0)
 Block: 1                Offsets:    0 to  511           Dba:0x00000000
------------------------------------------------------------------------
 00a20000 0000c0ff 00000000 00000000 64590000 00200000 00a30200 7d7c7b7a 
 a0810000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 
 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 
 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 
 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 
 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 
 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 
 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 
 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 
 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 
 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 
 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 
 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 
 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 
 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 
 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 

 <32 bytes per line>

BBED> set block 2
BBED-00309: out of range block number (2)


BBED> set offset 8190
        OFFSET          8190

BBED> dump
 File: ././dd_xifenfei01.dbf (0)
 Block: 1                Offsets: 8190 to 8191           Dba:0x00000000
------------------------------------------------------------------------
 0000 

 <32 bytes per line>
--证明只有1个数据块(8192),并且拷贝数据文件头部成功

3.模拟创建文件

[oracle@node1 tmp]$ ll /tmp/dd_xifenfei02.dbf -h
-rw-r--r-- 1 oracle oinstall 1.0G 01-13 16:58 /tmp/dd_xifenfei02.dbf

4.拷贝数据块到一个文件中

[oracle@node1 chf]$ dd if=/tmp/dd_xifenfei01.dbf of=/tmp/dd_xifenfei02.dbf bs=8192 count=1
1+0 records in
1+0 records out
8192 bytes (8.2 kB) copied, 6e-05 seconds, 137 MB/s
[oracle@node1 chf]$ bbed
Password: 

BBED: Release 2.0.0.0.0 - Limited Production on Fri Jan 13 17:01:02 2012

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

************* !!! For Oracle Internal Use only !!! ***************

BBED> set filename '/tmp/dd_xifenfei02.dbf'

BBED> set block 1
        BLOCK#          1

BBED> dump
 File: ././dd_xifenfei02.dbf (0)
 Block: 1                Offsets:    0 to  511           Dba:0x00000000
------------------------------------------------------------------------
 00a20000 0000c0ff 00000000 00000000 64590000 00200000 00a30200 7d7c7b7a 
 a0810000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 
 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 
 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 
 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 
 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 
 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 
 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 
 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 
 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 
 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 
 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 
 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 
 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 
 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 
 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 

 <32 bytes per line>


BBED> set block 2
BBED-00309: out of range block number (2)


BBED> set offset 8190
        OFFSET          8190

BBED> dump
 File: ././dd_xifenfei02.dbf (0)
 Block: 1                Offsets: 8190 to 8191           Dba:0x00000000
------------------------------------------------------------------------
 0000 

 <32 bytes per line>

通过对比在2步骤中拷贝出来的数据文件头部,证明现在已经把该头部拷贝到了3步骤创建的新文件中

topas命令详解

1.AIX系统版本

-bash-3.00$ oslevel 
5.3.0.0

2.topas命令

Topas Monitor for host:    aix                  EVENTS/QUEUES    FILE/TTY
Sun Jan  8 12:51:10 2012   Interval:  2         Cswitch    5529  Readch    11620
                                                Syscall    6767  Writech 4357.3K
Kernel    1.7   |#                           |  Reads         7  Rawin         1
User      1.6   |#                           |  Writes       40  Ttyout      403
Wait      0.3   |#                           |  Forks         0  Igets         0
Idle     96.4   |############################|  Execs         0  Namei         6
                                                Runqueue    0.0  Dirblk        0
Network  KBPS   I-Pack  O-Pack   KB-In  KB-Out  Waitqueue   0.0
en0       0.9      2.0     3.0     0.3     0.7 
lo0       0.1      1.0     1.0     0.0     0.0  PAGING           MEMORY
                                                Faults        8  Real,MB    1904
Disk    Busy%     KBPS     TPS KB-Read KB-Writ  Steals        0  % Comp     46
hdisk0   11.5     4.2K   27.5     0.0     4.2K  PgspIn        0  % Noncomp  11
hdisk1    0.0     0.0     0.0     0.0     0.0   PgspOut       0  % Client   11
cd0       0.0     0.0     0.0     0.0     0.0   PageIn        0
                                                PageOut    1064  PAGING SPACE
Name            PID  CPU%  PgSp Owner           Sios       1064  Size,MB     512
python      2400440   1.3   6.0 sutl                             % Used     43
python      2433268   1.2   6.8 sutl            NFS (calls/sec)  % Free     57
trclogio    1650830   0.3   0.5 matthewH        ServerV2       0
dtgreet      340036   0.1   1.3 root            ClientV2       0   Press:
topas       1953858   0.1   1.7 xifenfei        ServerV3       0   "h" for help
muxatmd      106652   0.0   0.6 root            ClientV3       0   "q" to quit
gil           69666   0.0   0.9 root    
xmgc          49176   0.0   0.4 root    
sshd        2257092   0.0   2.8 pillow  
sshd        1101952   0.0   1.6 xifenfei
ping         848098   0.0   0.3 sylaryy 
X            331840   0.0   1.6 root    
bash        2756856   0.0   0.6 pillow  
ctlcallp    1966120   0.0   0.2 aug_gucc
ctlsmsno    1622246   0.0   0.2 aug_gucc
jobcente    1237188   0.0   0.2 aug_gucc
sshd        1744962   0.0   0.9 nanmingy
searchpl    1015886   0.0   0.2 aug_gucc
ctlinfos     254072   0.0   0.3 aug_gucc
msgcente    1511494   0.0   0.2 aug_gucc

3.topas参数列表

 Usage: topas [-d number_of_monitored_hot_disks]
              [-h show help information]
              [-i monitoring_interval_in_seconds]
              [-m Use monochrome mode - no colors]
              [-n number_of_monitored_hot_network_interfaces]
              [-p number_of_monitored_hot_processes]
              [-w number_of_monitored_hot_WLM classes]
              [-c number_of_monitored_hot_CPUs]
              [-P show full-screen Process Display]
              [-L show full-screen Logical Partition display]
              [-U username - show username owned processes with -P]
              [-D show full-screen Disk display]
              [-W show full-screen WLM Display]
              [-C show full-screen Cross-LPAR (CEC) Panel]
              [-R background Cross-LPAR (CEC) Recording mode]
              [-I remote monitoring interval in seconds]
              [-o availmem=total memory size allocated in MB]
              [-o unavailmem=total memory size unallocated in MB]
              [-o availcpu=total cpus allocated on the HMC]
              [-o unavailcpu=total cpus unallocated on the HMC]
              [-o partitions=number of partitions defined on the HMC]
              [-o reconfig=reconf interval in sec 30/60(default)/90/120/180/240/300]
              [-o poolsize=defined Pool Size required if HMC PUA restricts access]
              [-o managedsys=managed system name under which this partition is configured]
              [-o hmc=HMC name under which this partition is configured]
              
              HMC configuration and recording information documented in:
                  /usr/lpp/perfagent/README.perfagent.tools

4.主要参数说明
-d:指定要监控的磁盘数。如果屏幕显示的区域足够大的话,这也是磁盘可显示的最大数。当这个数值超出实际安装的磁盘数,仅仅监控并显示安装磁盘的信息,默认为20.
-i:设置监控时间的间隔(秒),默认为2秒。
-n:设置被监控的网络接口数。这也是在屏幕上显示的最大网络接口数,当这个值超出了实际安装的网络接口数,仅仅监控并显示安装的网络接口信息。参数缺省值为20,如果这个值设为0,将没有网络信息被监控。
-p:指定被监控的进程数。这也是在屏幕上显示的最大进程数。缺省值为20,如果这个值为0,没见进程信息被监控。得到的这些进程信息是topas的主要开销。如果进程信息不需要,通常使用这个参数指定那些不想要的进程信息。
-w:指明被监控的WLM类的值。这也是在屏幕上显示的最大WLM值,当这个值超出了实际安装的WLM数,仅仅显示那些安装的WLM类的信息,缺省值为20,如果这个值为0,将没有信息显示。
-c:指明被监控的CPU数。这也是在屏幕上显示的最大CPU值,当这个值超出了实际安装的CPU数,仅仅显示那些安装的CPU的信息,缺省值为20,如果这个值为0,将没有信息显示。
-P:显示整个全屏进程显示。显示一系列最繁忙的进程,类似于默认显示的一部分,每个进程仅仅显示几列,可以通过任何列排序。
-W:显示全屏WLM(负载管理器)类。顶部显示一系列WLM类,类似于WLM类的一部分显示。
其实topas命令等同于:topas -d20 -i2 -n20 -p20 -w20 -c20

5.一些子命令说明
a 这个键显示所有被监控的(CPU,network,disk,WLM,process)不同部分。
c 这个键在累积报告和最忙的CPU之间进行切换。
d 这个键在最忙的磁盘和系统总的磁盘活动之间进行切换。
h 显示帮助信息。
n 这个键在最忙的接口和系统总的网络活动之间进行切换。
w 这个键在WLM类的开关之间切换。
p 这个键进程的开关之间切换。
P 这个键用全屏进程显示替换默认的显示。
W 这个键用全屏WLM类显示替换默认显示。
f 移动光标到一个WLM类上,这个键可以在WLM屏幕底端显示一系列进程情况。
q 退出程序。
r 更新显示。

6.topas内容说明
6.1)反映CPU使用率和工作状况
User%:显示运行的用户程序所占用的CPU百分比;
Kern%:显示运行的内核程序所占用的CPU百分比;
Wait%:显示等待IO操作所占用的CPU百分比;
Idel%:显示CPU空闲的百分比。

6.2)反映网络使用率的状况
Interf:网络接口的名称;
KBPS:在监控期间每秒钟通过的以M为单位的总流量,这部分包括每秒钟接收和发送的总和。
I-Pack:在监控期间每秒钟接收到的数据包数;
O-Pack:在监控期间每秒钟发送的数据包数;
KB-In:在监控期间每秒钟接收到的字节数(以K为单位);
KB-Out:在监控期间每秒钟发送的字节数(以K为单位)。

6.3)反映磁盘使用率的状况
Disk:物理磁盘的名称;
Busy%:磁盘繁忙的百分比,即磁盘能满足的最大IOPS(每秒IO操作数)和当前IO数量的比率
KBPS:在监控期间每秒钟读写的字节数(以K为单位);
TPS:每秒钟物理磁盘的数据传输量。一次传输指的是一次I/O请求;
KB-Read:每秒钟从物理磁盘读出的K字节数;
KB-Write:每秒钟向物理磁盘写入的K字节数。

6.4)反映进程的状况
NAME:可执行程序的名称;
Process ID:进程的ID号;
%CPU Utilization:进程的CPU平均使用率,这个值指的是进程在生命周期中的平均使用率;
Paging Space Used:分配给进程的分页空间大小;
Process Owner:拥有这个进程的用户名;
Workload Management(WLM)Class:进程属于哪个WLM class。

6.5)EVENTS/QUEUES 状况
Cswitch:在监控期间每秒钟上下文转换的次数;
Syscall:在监控期间每秒钟运行系统呼叫的总次数;
Reads:在监控期间每秒钟运行读系统呼叫的次数;
Writes:在监控期间每秒钟运行写系统呼叫的次数;
Forks:在监控期间每秒钟运行派生系统呼叫的次数;
Execs:在监控期间每秒钟运行执行系统呼叫的次数;
Runqueue:等待处理器空闲以便运行的线程平均数;
Waitqueue:等待分页完成的线程平均数;

6.6)FILE/TTY 状况
Readch:在监控期间通过读系统呼叫每秒钟读出的字节数;
Writech:在监控期间通过写系统呼叫每秒钟写入的字节数;
Rawin:在监控期间通过TTYs每秒钟读入的裸字节数;
Ttyout:在监控期间每秒钟写入TTYs的字节数;
Igets:在监控期间每秒钟到节点查找例行程序的呼叫数;
Namei:在监控期间每秒钟路径查找例行程序的呼叫数;
Dirblk:在监控期间通过目录搜索例行程序每秒钟扫描到的目录块数;

6.7)PAGING部分显示的是分页每秒钟次数的统计
Faults:在监控期间每秒钟发生的分页错误总数;
Steals:在监控期间被虚拟内存管理器每秒钟偷走的物理内存4k的帧;
PgspIn:在监控期间每秒钟从分页空间中读取的4k分页数;
PgspOut:在监控期间每秒钟写入分页空间的4k分页数;
PageIn:在监控期间每秒钟读取的4k分页数,这包括从文件系统读操作相关的分页活动,从这个值减去PgspIn的值就是每秒钟从文件系统读操作相关的分页活动数;
PageOut:在监控期间每秒钟写入的4k分页数,这包括向文件系统写操作相关的分页活动,从这个值减去PgspOut的值就是每秒钟向文件系统写操作相关的分页活动数;
Sios:在监控期间通过虚拟内存管理器得到的I/O请求数;

6.8)Momory部分显示的是实际内存和在使用中的内存
Real,MB:以M为单位的实际内存;
%Comp:当前分配给计算分页片断的内存占实际内存的百分比。计算分页片断由分页空间产生。
%Nocomp:当前分配非计算分页片断的内存占实际内存的百分比。非计算分页片断包括那些文件空间,数据文件、可执行文件、或者共享库文件。
%Client:当前分配给用来缓冲远程挂载文件的内存占实际内存的百分比。

6.9)PAING SPACE显示分页空间的大小和使用率
Size,MB:系统里所有分页空间的大小,以M为单位;
%Used:当前使用的分页空间占总空间的百分比;
%Free:当前空闲的分页空间占总空间的百分比。

6.10)NFS (calls/sec)状况
Display NFS stats in calls per second

恢复被rm意外删除数据文件

一.模拟数据文件删除

[oracle@node1 ~]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.3.0 Production on Sat Dec 31 22:00:52 2011

Copyright (c) 1982, 2011, Oracle.  All rights reserved.

--数据库版本
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, Oracle Label Security, OLAP, Data Mining,
Oracle Database Vault and Real Application Testing options

--所有数据文件
SQL> select name from v$datafile;

NAME
--------------------------------------------------------------------------------
/opt/oracle/oradata/ora11g/system01.dbf
/opt/oracle/oradata/ora11g/sysaux01.dbf
/opt/oracle/oradata/ora11g/undotbs01.dbf
/opt/oracle/oradata/ora11g/users01.dbf
/opt/oracle/oradata/ora11g/example01.dbf

--删除example01.dbf数据文件
SQL> !rm /opt/oracle/oradata/ora11g/example01.dbf

SQL> !ls -l /opt/oracle/oradata/ora11g/example01.dbf
ls: /opt/oracle/oradata/ora11g/example01.dbf: 没有那个文件或目录

--因为数据文件被删除,创建表失败
SQL> create table t_xifenfei tablespace example
  2  as select * from dba_tables;
as select * from dba_tables
                 *
ERROR at line 2:
ORA-01116: error in opening database file 5
ORA-01110: data file 5: '/opt/oracle/oradata/ora11g/example01.dbf'
ORA-27041: unable to open file
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3

二.找回数据文件

--查找dbw进程spid
[oracle@node1 ~]$ ps -ef|grep dbw|grep -v grep
oracle   18387     1  0 Dec22 ?        00:00:12 ora_dbw0_ora11g

--查看该进程所有文件句柄
[oracle@node1 ~]$ ll /proc/18387/fd
总计 0
lr-x------ 1 oracle oinstall 64 12-31 22:03 0 -> /dev/null
l-wx------ 1 oracle oinstall 64 12-31 22:03 1 -> /dev/null
lr-x------ 1 oracle oinstall 64 12-31 22:03 10 -> /dev/zero
lr-x------ 1 oracle oinstall 64 12-31 22:03 11 -> /dev/zero
lr-x------ 1 oracle oinstall 64 12-31 22:03 12 -> /opt/oracle/product/11.2.0/db_1/rdbms/mesg/orazhs.msb
lrwx------ 1 oracle oinstall 64 12-31 22:03 13 -> /opt/oracle/product/11.2.0/db_1/dbs/hc_ora11g.dat
lr-x------ 1 oracle oinstall 64 12-31 22:03 14 -> /proc/18387/fd
lr-x------ 1 oracle oinstall 64 12-31 22:03 15 -> /dev/zero
lr-x------ 1 oracle oinstall 64 12-31 22:03 16 -> /opt/oracle/product/11.2.0/db_1/rdbms/mesg/oraus.msb
lrwx------ 1 oracle oinstall 64 12-31 22:03 17 -> /opt/oracle/product/11.2.0/db_1/dbs/hc_ora11g.dat
lrwx------ 1 oracle oinstall 64 12-31 22:03 18 -> /opt/oracle/product/11.2.0/db_1/dbs/lkORA11G
lr-x------ 1 oracle oinstall 64 12-31 22:03 19 -> /opt/oracle/product/11.2.0/db_1/rdbms/mesg/orazhs.msb
l-wx------ 1 oracle oinstall 64 12-31 22:03 2 -> /dev/null
lr-x------ 1 oracle oinstall 64 12-31 22:03 20 -> /opt/oracle/product/11.2.0/db_1/rdbms/mesg/oraus.msb
lrwx------ 1 oracle oinstall 64 12-31 22:03 21 -> socket:[441562]
lrwx------ 1 oracle oinstall 64 12-31 22:03 256 -> /opt/oracle/oradata/ora11g/control01.ctl
lrwx------ 1 oracle oinstall 64 12-31 22:03 257 -> /opt/oracle/oradata/ora11g/system01.dbf
lrwx------ 1 oracle oinstall 64 12-31 22:03 258 -> /opt/oracle/oradata/ora11g/sysaux01.dbf
lrwx------ 1 oracle oinstall 64 12-31 22:03 259 -> /opt/oracle/oradata/ora11g/undotbs01.dbf
lrwx------ 1 oracle oinstall 64 12-31 22:03 260 -> /opt/oracle/oradata/ora11g/users01.dbf
lrwx------ 1 oracle oinstall 64 12-31 22:03 261 -> /opt/oracle/oradata/ora11g/example01.dbf (deleted)
lrwx------ 1 oracle oinstall 64 12-31 22:03 262 -> /opt/oracle/oradata/ora11g/temp01.dbf
lr-x------ 1 oracle oinstall 64 12-31 22:03 3 -> /dev/null
lr-x------ 1 oracle oinstall 64 12-31 22:03 4 -> /dev/null
lrwx------ 1 oracle oinstall 64 12-31 22:03 5 -> /opt/oracle/product/11.2.0/db_1/dbs/hc_ora11g.dat
lr-x------ 1 oracle oinstall 64 12-31 22:03 6 -> /dev/null
lr-x------ 1 oracle oinstall 64 12-31 22:03 7 -> /dev/null
lr-x------ 1 oracle oinstall 64 12-31 22:03 8 -> /dev/null
lr-x------ 1 oracle oinstall 64 12-31 22:03 9 -> /dev/null
--通过句柄恢复数据文件[被删除数据文件会被标示(deleted)]
[oracle@node1 ~]$ cp /proc/18387/fd/261 /opt/oracle/oradata/ora11g/example01.dbf
--确认该数据文件已经恢复成功
[oracle@node1 ~]$ ll /opt/oracle/oradata/ora11g/example01.dbf
-rw-r----- 1 oracle oinstall 362422272 12-31 22:05 /opt/oracle/oradata/ora11g/example01.dbf

三.数据文件online

SQL> alter database datafile 5 offline;
 
Database altered.
 
SQL> recover datafile 5;
Media recovery complete.
SQL> alter database datafile 5 online;
 
Database altered.

SQL> create table t_xifenfei tablespace example
  2  as select * from dba_tables;

Table created.

四.补充说明
在意外使用os命令删除掉数据文件时,千万不要慌张重启数据库或者操作系统,可以通过dbwn进程相关句柄找回数据文件

Linux中文件大小限制

在日常的维护中,偶尔总担心某个文件会不会因为太大(超过系统限制大小),导致工作不正常。查找了一些资料,这里对文件大小限制的情况做个记录,以便以后做到心中有底
一、文件大小限制列表

二、查看数据块大小
1、直接查看操作磁盘(Block size)

[root@bas ~]# tune2fs -l /dev/sda2
tune2fs 1.35 (28-Feb-2004)
Filesystem volume name:   /home
…………
Block size:               4096
Fragment size:            4096
…………
Journal backup:           inode blocks

2、查看某个文件(IO Block)

[oracle@bas backup]$ stat full_back.dmp 
  File: `full_back.dmp'
  Size: 429687808000    Blocks: 840054384  IO Block: 4096   regular file
Device: 812h/2066d      Inode: 13          Links: 1
Access: (0644/-rw-r--r--)  Uid: (  501/  oracle)   Gid: (  501/oinstall)
Access: 2011-12-18 02:00:25.000000000 +0800
Modify: 2011-12-18 20:49:31.000000000 +0800
Change: 2011-12-18 20:49:31.000000000 +0800

Linux重设root密码

今天去省公安厅部署系统,那边没有网络,不用使用自己的电脑,突然发现原来网络是那么的美好,原来自己电脑上的资料是那么的珍贵;也发现一个问题,做技术的要坦实,是实实在在的懂,而不是说我有个了解,然后google下就可以了。今天就遇到有Linux服务器root密码忘记了,因为sa没有过去,开发不懂,只能我去重设,因为以前这些活都是sa做的,自己有所了解但是记忆不深,今天在自己的大脑中拼命的搜索,不断的尝试,终于修改成功了。晚上回家在vm中做了linux 4/5/6三个版本的修改密码方法截,给自己留个记录,也供大家参考,免得临时手忙脚乱
Linux重设root密码