RHEL 6.0 system sudo switch user is too slow how to do?

  

We all know that Linux systems can use the sudo command to increase permissions, but in RHEL6.0, when using the sudo command to log in to the user, the problem of slow switching is a waste of time. How to deal with it?

question:

RHEL6.0 when using the sudo command, immediately prompted to enter the current user password, enter the password until the transport system will in the long wait, I do not know After a long time, it was suddenly executed!

Solution:

1. Switch to superuser

[test@test ~]$ su -

Password:

2 View host name

[root@test ~]# hostname

test

3. Enter the following command

[root@test ~]# echo ‘127.0.0.1 test.localdomain test’ 》 /etc/hosts

This means that the host hostname is consistent with the query. After this command is executed, using sudo again will respond immediately.

The above is the solution for sudo switching too slow under RHEL6.0. If you have the same problem, try the method described in this article.

Copyright © Windows knowledge All Rights Reserved