linux加载设备命令行 linux系统加载设备需要设置的文件( 三 )


改”)
第五段: 4---------系统将强制用户修改为新密码之前的天数(1 表示“永远
都不能修改”)
第六段: 5---------密码过期之前 , 用户将被警告过期的天数(-1 表示“没有
警告”)
第七段: 6---------密码过期之后,系统自动禁用帐户的天数(-1 表示“永远
不会禁用”)
第八段: 12267-----该帐户被禁用的天数(-1 表示“该帐户被启用”).以 1970
年 1 月 1 日为 1,1 月 2 日为 2
第九段 ------ 保留供将来使用
注:第 2 段中为*表示帐号不可登录,如密码前为 !! 或只有 !! 表示帐号被锁
2.安全性/etc/shadow 的默认所有者和所有组均为 root.
建议运行# chattr +i /etc/shadow 来保护文件使其不被意外地删除或重写
3.相关命令
passwd
useradd
userdel
usermod
/ect/gshadow
1.文件格式
/ect/gshadow 文件保存的是用户和组群设置的信息
例:
root:!!::root,wa1
第一段:组名
第四段:该组包含用户列表
2.安全性
/etc/gshadow 的默认所有者和所有组均为 root.
建议运行# chattr +i /etc/shadow 来保护文件使其不被意外地删除或重写
3.相关命令
groupadd
groupdel
groupmod
groups
/etc/sysctl.conf
1.文件格式
/etc/sysctl.conf 是 sysctl 程序的配置文件.sysctl 可以在系统运行时更改内
核参数./etc/sysctl.conf 中的配置将在系统起动时执行.
以 # 和 ; 开始的行是注释,将和空白行一起被忽略.
配置项的格式为:
token = value
token 是一个键名,value 是对应的键值.token 和 value 前后的空格将被忽略
token 不能是随意的字符串.他和/proc/sys 下的文件有一一对应的关系:
.h2 NEWS_PROXY
.h2 NNTP_PROXY
# Lynx version 2.2 and beyond supports the use of proxy servers that can act as
# firewall gateways and caching servers. They are preferable to the older
# gateway servers. Each protocol used by Lynx can be mapped separately using
# PROTOCOL_proxy environment variables (see Lynx Users Guide). If you have
# not set them externally, you can set them at run time via this configuration file.
# They will not override external settings. The no_proxy variable can be used
# to inhibit proxying to selected regions of the Web (see below). Note that on
# VMS these proxy variables are set as process logicals rather than symbols, to
# preserve lowercasing, and will outlive the Lynx image.
#
.ex 15
http_proxy:
ftp_proxy:
#http_proxy:
#ftp_proxy:
.h2 NO_PROXY
# The no_proxy variable can be a comma-separated list of strings defining
# no-proxy zones in the DNS domain name space. If a tail substring of the
# domain-path for a host matches one of these strings, transactions with that# node will not be proxied.
.ex
no_proxy:demiurge.in.ibm.com, demiurge
更改配置文件
在更改配置文件时,如果程序不是由系统管理员或内核控制的,就要确保重新启动过使用该配置的程
序 。普通用户通常没有启动或停止系统程序和/或守护进程的权限 。
内核
更改内核中的配置文件会立即影响到系统 。例如,更改 passwd 文件以增加用户将立即使该用户变为
可用 。而且任何 Linux 系统的 /proc/sys 目录中都有一些内核可调参数 。只有超级用户可以得到对
所有这些文件的写访问权力;其它用户只有只读访问权力 。此目录中文件的分类的方式和 Linux 内
核源代码的分类方式一样 。此目录中的每个文件都代表一个内核数据结构,这些数据结构可以被动态
地修改,从而改变系统性能 。
注意:在更改其中任何文件的任何值之前,您应该确保自己全面了解该文件,以避免对系统造成不可

推荐阅读