Answer: Do the following steps as:
1.vi /etc/security/access.conf
-:jack:ALL EXCEPT station10.example.com
2.vi /etc/pam.d/system-auth
accountrequired/lib/security/pam_access.so
/etc/security/access.conf file helps to allow or deny login to users on the basis of origin.
Syntax of /etc/security/access.conf
permission : users : origins
The first field should be a "+" (access granted) or "-" (access denied) character.
The second field should be a list of one or more login names, group names, or ALL (always matches). A pattern of the form user@host is matched when the login name matches the "user" part, and when the "host" part matches the local machine name.
The third field should be a list of one or more tty names (for non-networked logins), host names, domain names (begin with "."), host addresses, internet network numbers (end with "."), ALL (always matches) or LOCAL (matches any string that does not contain a "." character).
The EXCEPT operator makes it possible to write very compact rules
Submit