linux怎么查询台账信息

来源:互联网 发布:淘宝客自动采集漏洞 编辑:程序博客网 时间:2024/05/01 19:44
1)系统安装时间

passwd -S root[(27) root@Fedora~]#passwd -S rootroot PS 2017-05-27 0 99999 7 -1 (密码已设置,使用SHA512算法)输出信息:root:代表查询的用户PS:表示已经存在密码或者已经被锁。NP 表示没有密码  LK 表示用户被锁2017-05-27 :表示上次用户密码更改时间0    :密码更改最小日期99999    :密码更改最大日期7    :密码过期提醒期限-1   :密码过期后仍可使用的时间原文: -S     Report  password  status  on  the  named account. The first part           indicates if the user account is locked (LK),  has  no  password           (NP),  or  has  an  existing or locked password (PS). The second            part gives the date of the last password change. The next  parts            are the minimum age, maximum age, warning period, and inactivity            period for the password.

2)查询MAC


[(33) root@Fedora~]#ifconfigenp2s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500        inet 10.20.41.182  netmask 255.255.0.0  broadcast 10.20.255.255        inet6 fe80::223:9eff:fe03:da00  prefixlen 64  scopeid 0x20<link>        ether 00:23:9e:03:da:00  txqueuelen 1000  (Ethernet)        RX packets 1148342  bytes 300679175 (286.7 MiB)        RX errors 0  dropped 0  overruns 0  frame 0        TX packets 877017  bytes 302273584 (288.2 MiB)        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0        device interrupt 3  其中ether就是MAC地址查询mac地址第二种方法:lshw -c network[(32) root@Fedora~]#lshw -c network  *-network                      description: Ethernet interface       product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller       vendor: Realtek Semiconductor Co., Ltd.       physical id: 0       bus info: pci@0000:02:00.0       logical name: enp2s0       version: 0c       serial: 00:23:9e:03:da:00       size: 100Mbit/s       capacity: 1Gbit/s       width: 64 bits       clock: 33MHz       capabilities: pm msi pciexpress msix vpd bus_master cap_list ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation       configuration: autonegotiation=on broadcast=yes driver=r8168 driverversion=8.042.00 duplex=full ip=10.20.41.182 latency=0 link=yes multicast=yes port=twisted pair speed=100Mbit/s       resources: irq:3 ioport:5000(size=257) memory:58100000-58101000 memory:58200000-58204000其中serial就是MAC地址

3)查询硬盘序列号:

[(34) root@Fedora~]#hdparm -I /dev/sda/dev/sda:ATA device, with non-removable mediaModel Number:       LITEON IT LCH-128V2S                    Serial Number:      002631100XXF        Firmware Revision:  FC72102 Transport:          Serial, ATA8-AST, SATA 1.0a, SATA II Extensions, SATA Rev 2.5, SATA Rev 2.6, SATA Rev 3.0Standards:Supported: 9 8 7 6 5 Likely used: 9Configuration:Logicalmaxcurrentcylinders1638316383heads1616sectors/track6363--CHS current addressable sectors:   16514064LBA    user addressable sectors:  250069680LBA48  user addressable sectors:  250069680Logical  Sector size:                   512 bytesPhysical Sector size:                   512 bytesLogical Sector-0 offset:                  0 bytesdevice size with M = 1024*1024:      122104 MBytesdevice size with M = 1000*1000:      128035 MBytes (128 GB)cache/buffer size  = unknownNominal Media Rotation Rate: Solid State DeviceCapabilities:LBA, IORDY(can be disabled)Queue depth: 32Standby timer values: spec'd by Standard, no device specific minimumR/W multiple sector transfer: Max = 2Current = 2DMA: mdma0 mdma1 mdma2 udma0 udma1 udma2 udma3 udma4 udma5 *udma6      Cycle time: min=120ns recommended=120nsPIO: pio0 pio1 pio2 pio3 pio4      Cycle time: no flow control=120ns  IORDY flow control=120nsCommands/features:EnabledSupported:   *SMART feature set    Security Mode feature set   *Power Management feature set   *Write cache   *Look-ahead   *Host Protected Area feature set   *WRITE_BUFFER command   *READ_BUFFER command   *NOP cmd   *DOWNLOAD_MICROCODE    SET_MAX security extension   *48-bit Address feature set   *Device Configuration Overlay feature set   *Mandatory FLUSH_CACHE   *FLUSH_CACHE_EXT   *SMART error logging   *SMART self-test   *General Purpose Logging feature set   *WRITE_{DMA|MULTIPLE}_FUA_EXT   *WRITE_UNCORRECTABLE_EXT command   *{READ,WRITE}_DMA_EXT_GPL commands   *Segmented DOWNLOAD_MICROCODE   *Gen1 signaling speed (1.5Gb/s)   *Gen2 signaling speed (3.0Gb/s)   *Gen3 signaling speed (6.0Gb/s)   *Native Command Queueing (NCQ)   *Host-initiated interface power management   *Phy event counters   *DMA Setup Auto-Activate optimization    Device-initiated interface power management   *Software settings preservation    unknown 78[8]   *SMART Command Transport (SCT) feature set   *SCT Write Same (AC2)   *SCT Error Recovery Control (AC3)   *SCT Features Control (AC4)   *SCT Data Tables (AC5)   *DOWNLOAD MICROCODE DMA command   *WRITE BUFFER DMA command   *READ BUFFER DMA command   *Data Set Management TRIM supported (limit 8 blocks)   *Deterministic read ZEROs after TRIMSecurity: Master password revision code = 65534supportednotenablednotlockednotfrozennotexpired: security countsupported: enhanced erase2min for SECURITY ERASE UNIT. 2min for ENHANCED SECURITY ERASE UNIT. Checksum: correct其中Serial Number就是序列号了。