If “maxlogins” parameter is set in /etc/security/nf then user would be allowed up to the parameter set and further connections would be denied.
If “AllowUsers” parameter is configured in /etc/ssh/sshd_config then need to add required user to this list to get access. If an user failed to login remotely via ssh then the reasons could be different. This could be because of no terminals available or defined in /etc/securetty file. – Only root user login failed from console, however, works in GUI.
REDHAT LINUX INTERVIEW QUESTIONS PASSWORD
To Change Password Encryption Method to sha512: If it begins with = $6 > indicates sha512 – Check the password beginning character in the second field of /etc/shadow file:
REDHAT LINUX INTERVIEW QUESTIONS HOW TO
(12) How to find out the shadow password encryption method being used in Linux? How could this be changed (example : from md5 to sha512)?ĪNS:- We can find out the password encryption method being used for shadow passwords as shown below: Smurthy PS 0 99999 7 -1 (Password set, SHA512 crypt.) To “unlock” an user account, run this command “passwd -u. Accounts locked with usermod command would record it in /var/log/secure file by default. Otherwise, a single exclamation mark indicates that the account got locked with the command “usermod -L ”. If you notice a double exclamation mark here (“!!”) this indicates that the account got locked-up by running the command “passwd -l ” command (available only for root user). Smurthy LK 0 99999 7 -1 (Password locked.) Otherwise, grep for the username from /etc/shadow file and you could see “!” mark prefixed to the encrypted password field. (11) How to check if an user account has been locked?ĪNS:- Run the command “passwd -S ”, this would show if the password has been locked or not. Linux System Admin Interview Questions And Answers bashrcĦ08248 drwxr-xr-x 4 alldoctors alldoctors 4096 Aug 3 00:31. ~]# grep alldoctors /etc/passwdĪlldoctors:x:912:913::/root/doctor:/bin/bash This would create the users home directory with the name of the user under the specified HOME directory as defined in /etc/default/useradd.
– You could check the useradd defaults using the command :#useradd -DĪfter this you can add users with the command “useradd ”. After this any new users home directory would be under /home1 This gets applicable to any new users who gets created i.e the home directory of that user should be /home1// (9) Create users home directory in /home1 directory instead of default /home directory.