摘要:1.passwd命令 2.chage -l命令 Showing Password Expiry Information with chage -l 如果时间小于(Minimum number of days between password change : 3),则不允许修改密码。
阅读全文
摘要:Configuration Files for User Management Defaults When working with tools as useradd, some default values are assumed. These default values are set in
阅读全文
摘要:Modifying the Configuration Files To add user accounts, it suffices that one line is added to /etc/passwd and another line is added to /etc/shadow, in
阅读全文
摘要:sudo Instead of using the root user account, unprivileged users can be configured for using administrator permissions on specific tasks by using sudo.
阅读全文
摘要:Using su The su command allows users to open a terminal window, and from that terminal start a sub shell in which the user has another identity. To perform administrative tasks, for insta...
阅读全文
摘要:ls Common Command-Line Options Command Use: ls -l Shows a long listing, which includes information about file properties, such as creation date and permissions. ls -a Shows all fil...
阅读全文
摘要:Counting Lines, Words, and Characters with wc When working with text files, you sometimes get a large amount of output. Before deciding which approach
阅读全文
摘要:Sorting File Contents and Output with sort Another very useful command to use on text file is sort . As you can probably guess, this command sorts tex
阅读全文
摘要:Filtering Specific Columns with cut When working with text files, it can be useful to filter out specific fields. Imagine that you need to see a list
阅读全文
摘要:[root@rhel7 ~]# cat rusky --cat命令查看文件内容 line1 line2 line3 line4 line5 line6 line7 line8 line9 line10 [root@rhel7 ~]# tail -n 3 rusky --查看最后3行内容 line8 line9 line10 [root@rhel7 ~]# tail -3 rusky ...
阅读全文
摘要:[rusky@rhel7 test]$ lstest1 test123 test2 test317 test33 test335 test336 test44 testtest[rusky@rhel7 test]$ ls test?3test33[rusky@rhel7 test]$ ls test??3test123[rusky@rhel7 test]$ ls test...
阅读全文
摘要:■ The mount command gives an overview of all mounted devices. To get this information, the /proc/mounts file is read, where the kernel keeps informati
阅读全文
摘要:/etc/motd and /etc/issue Bash offers an option to include messages in the /etc/motd and the /etc/issue files. Messages in /etc/motd display after a us
阅读全文
摘要:Environment Configuration Files When a user logs in, an environment is created for that user automatically. This happens based on four different files
阅读全文
摘要:普通用户登录系统报错,提示: -bash: ulimit: open files: cannot modify limit: Operation not permitted. 处理方法: #vi /etc/ssh/sshd_config --使用root账号修改UseLoin 为yes UseLog
阅读全文
摘要:对所有用户都生效: vi /etc/profile 添加一行如下: ulimit -n 65535 执行source /etc/profile生效,不需要重启服务器。 $ source /etc/profile$ ulimit -n65535 以后重启服务器后也生效。 如果不修改,默认值为1024,
阅读全文
摘要:/dev/null 文件 如果希望执行某个命令,但又不希望在屏幕上显示输出结果,那么可以将输出重定向到 /dev/null: /dev/null 是一个特殊的文件,写入到它的内容都会被丢弃;如果尝试从该文件读取内容,那么什么也读不到。但是 /dev/null 文件非常有用,将命令的输出重定向到它,会
阅读全文
摘要:定时执行命令: 定时执行脚本: at命令的常见用法: at 2pm + 2 days /root/test.sh //2天后,下午2点执行test.sh脚本 at 10am + 2 weeks /root/test.sh //2个星期后,早上10点执行test.sh脚本 at 12am tomorr
阅读全文
摘要:简单测试例子: 添加定时任务前,注意查看crond服务是否已经启动,如果未启动,则用命令service crond start命令启动。 注意给脚本添加可执行权限。 测试2: 多个数值用逗号隔开,如在每月1、3、4、12号的22:03执行定时任务 测试3: 连续时间可用“-”表示。如在每个小时10分
阅读全文
摘要:目标环境,5台linux centos 6.3, 一台作为NTPD服务与外部公共NTP服务同步时间,同时作为内网的NTPD服务器,其他机器与这台服务做时间同步。 1、负责与外部公共NTPD服务同步标准时间 2、作为内外网络的NTPD服务 NTPD服务平滑同步 1、NTP时间同步方式选择 NTP同步方
阅读全文