• VMware

    Learn about VMware virtualization for its products like vsphere ESX and ESXi, vCenter Server, VMware View, VMware P2V and many more

  • Linux

    Step by step configuration tutorials for many of the Linux services like DNS, DHCP, FTP, Samba4 etc including many tips and tricks in Red Hat Linux.

  • Database

    Learn installation and configuration of databases like Oracle, My SQL, Postgresql, etc including many other related tutorials in Linux.

  • Interview Questions on Linux User Management with Answers

    1. How can you create a user without useradd command

    2. What is the default permission on user's home directory?

    3. What is the difference between .bash_profile and .bashrc?

    4. What is the command to create a user with a pre defined uid, shell and home directory?

    5. Explain each field of /etc/passwd

    6. How to change primary group for any user?

    7. If I delete a user, does it's home directory gets deleted? If not then what is the command to delete the home directory of user along with the user

    8. Name any 3 files which are automatically created inside any user's home directory when a user is added

    9. What is the command to view all the currently logged in users?

    10. What is the command to change and view the expiry date for any user?

    11. What are the details you get with finger command?

    12. How can you give a normal user all the root level privileges?

    13. Name any 3 groups of which root is a member by default

    14. How can you give sudo access to any user without asking him to provide passord every time he runs a command?

    15. Why do we use visudo rather than editing the file with vi or any other editor?

    Interview Questions on Linux User Management with Answers Interview Questions on Linux User Management with Answers Reviewed by admin on Saturday, January 25, 2014 Rating: 5


    1. Thanks for the nice post, post some tricky user admin interview questions if you have.

    2. Default umask for the Root is 0022 hence file - 644 and dir - 755 whereas default umask for non-root user is 0002 hence file- 664 and dir -775 permissions.

    3. Default Umask of Root is 0022 hence file - 644 and dir - 755 whereas default umask for non-root is 0002 hence file - 664 and dir - 775 .

    4. Suggestion :-
      How to lock & unlock a user
      Can 2 user have same uid & gid

      1. Hi Shubham
        you can lock and unlock if you had two users have with same uid and gid also by using below commands .
        ex: i have two users test and test1

        usermod -L test -->it will lock to test user
        usermod -L test1 --> it will lock to test1 user

        u can verify in /etc/shadow file
        cat /etc/shadow |grep -i test
        cat /etc/shadow |grep -i test1

        o/p : u can observer below 2 lines after test: ! is there its indicates user is currently locked.

    5. i need step by step process of truobleshooting user login issues when user unable to login??

      1. I have written this article to understand login process

        but to troubleshoot login issues there are various things which can be done

        Like execute ssh with verbose and check the stage where it fails
        monitor the client node's sshd logs and see the error message you get (this will give you the best hint)
        Disable firewall on server and client side and see if that is the problem
        Minimize sshd hardening if any of your recent sshd hardening changes led to the problem
        check password of the usr, if it is blocked

        and many more..


    Powered by Blogger.