|
The password can be said to be the first line of defense Linux system, most of the current attacks on the system from the Internet are beginning to intercept passwords or password guessing, so we should choose a more secure password.
You must first eliminate the Linux environment does not account passwords exist. This can be by looking at the / etc / passwd file found. For example, a user account named test exists, there is no password is set in the / etc / passwd file, there is the following line:
test :: 100: 9 :: / home / test: / bin / bash
Its second is empty, indicating that the test account password is not set, it is very dangerous! Such accounts should be deleted or set a password.
Secondly, in the old version of linux, in the / etc / passwd file that contains the encrypted password, which gives the system security is a big risk, the easiest way is that you can use brute force method to get a password. You can use the command / usr / sbin / pwconv or / usr / sbin / grpconv to create / etc / shadow or / etc / gshadow file, so in / etc / passwd file no longer contains the encrypted password, but on the / etc / shadow file, the file is read only the super user root!
The third point is to modify some system accounts Shell variables such as uucp, ftp and news, etc., and some just need FTP account features, be sure not to set the / bin / bash or / bin / sh Shell and other variables to them. In / etc / passwd in their Shell variable blanking, for example set to / bin / false or / dev / null, etc., can also be used usermod -s / dev / null username command to change the username of Shell to / dev / null. Thus the use of these accounts will not be able to Telnet remote login to the system!
The fourth point is to modify the default password length: When you install linux default password length is 5 bytes. But this is not enough to have it set to 8. Modify the minimum password length login.defs need to edit the file (vi / etc / login.defs), the following line
PASS_MIN_LEN 5
To
PASS_MIN_LEN 8
login.defs file is the login program's configuration file. |
|
|
|