-c 标志定义口令必须包含的最少小写字母个数。缺省值为2。
-C 标志定义口令必须包含的最少大写......
编辑推荐:
(2010-11-14)
(2010-11-14)
(2010-11-14)
(2010-11-14)
Password:
[root@luoyinyou-dev ~]# yum install expect
Loaded plugins: fastestmirror
Determining fastest mirrors
* addons: centos.ustc.edu.cn
* base: centos.ustc.edu.cn
* extras: centos.ustc.edu.cn
* updates: mirrors.163.com
addons | 951 B 00:00
base | 2.1 kB 00:00
extras | 2.1 kB 00:00
extras/primary_db | 188 kB 00:00
updates | 1.9 kB 00:00
updates/primary_db | 815 kB 00:12
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package expect.i386 0:5.43.0-5.1 set to be updated
--> Finished Dependency Resolution
Dependencies Resolved
==========================================================================================================================================================================================================
Package Arch Version Repository Size
==========================================================================================================================================================================================================
Installing:
expect i386 5.43.0-5.1 base 158 k
Transaction Summary
==========================================================================================================================================================================================================
Install 1 Package(s)
Update 0 Package(s)
Remove 0 Package(s)
Total download size: 158 k
Is this ok [y/N]: y
Downloading Packages:
expect-5.43.0-5.1.i386.rpm | 158 kB 00:00
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : expect 1/1
Installed:
expect.i386 0:5.43.0-5.1
Complete!
[root@luoyinyou-dev ~]# mkpasswd -l 32 -d 5 -C 5
m5l96vuFVzvykjhbqn0sNC3fiamcofT*
[root@luoyinyou-dev ~]# mkpasswd -l 32 -d 5 -C 1
esq4dpTbem0v5iddbt6ub}o1lcvvrkar
[root@luoyinyou-dev ~]# mkpasswd
V8_bgc2Fh
[root@luoyinyou-dev ~]# mkpasswd
&aE6dndK7
[root@luoyinyou-dev ~]# mkpasswd
_5KvbY0qn
[root@luoyinyou-dev ~]# mkpasswd
8yg3lk}HS
用法:mkpasswd [args] [user]
不带参数的话, mkpasswd 返回一个新口令。带上用户名的话, mkpasswd 为该用户分配一个新口令。
根据以下的标志可以随机性的产生口令。
-l 标志定义口令长度。缺省值为9。以下示例建立一个20位的口令。
mkpasswd -l 20
-d 标志定义口令必须包含的最少数字位数。缺省值为2。以下示例建立一个含3位数字的口令。
mkpasswd -d 3
-c 标志定义口令必须包含的最少小写字母个数。缺省值为2。
-C 标志定义口令必须包含的最少大写字母个数。缺省值也是2。
The -s flag defines the minimum number of special characters that must be in the password. The default is 1.
-p 标志标明设立口令的程序。如果/etc/yppasswd存在的话则它为缺省值,否则就用/bin/passwd。
-2 标志交换键盘上左右手的字母(我想就是左手输入g则为h吧),以使别人更难监视输入的口令。这也使口令猜测程序更容易成功。
-v 使设定口令的交互可见,但缺省是不可见的。