Linux User and Accounts Management (QUIZ)

NOTE: Each correct answer would give you 5 point.

  1. What do you type in the password field of /etc/passwd to prevent a user from accessing a system?
  2. A comma (')
    An asterisk (*)
    An exclamation mark (!)
    Two exclamation marks (!!)

  3. Which system account sets permission on system processes?
  4. adm
    bin
    daemon
    root

  5. Which command do you use to enable shadowing?
  6. finger
    passwd
    pwconv
    pwunconv

  7. What is the command to determine when a user needs to change the password?
  8. chage -E
    chage -l
    chage -m
    chage -W

  9. Which command changes deepak's home directory from its default location to /usr/local directory?
  10. usermod -d /usr/local deepak
    usermod -g /usr/local deepak
    usermod -l /usr/local deepak
    usermod -a /usr/local deepak

  11. Which command removes the admin group from the system?
  12. groupdel -n admin
    groupdel -o -g admin
    groupmod -o delete admin
    groupdel admin

  13. Which command do you use to create a new password for user "deepak"?
  14. passwd deepak
    password deepak
    pswd deepak
    passwd -x deepak

  15. Select the system account contained in /etc/passwd file that owns the executable files
  16. adm
    bin
    daemon
    root

  17. Which passwd command option sets the maximum number of days after a password expires before an account is locked?
  18. i
    l
    n
    w

  19. What does usermod -l deepak pradeep command do?
  20. Add deepak to the system
    Change the login name of deepak to pradeep
    Delete deepak's account and replace with pradeep account
    Move the files in pradeep's home directory to deepak's home directory

  21. In which file or directory are user's folders created by default?
  22. /etc/passwd
    /etc/group
    /home
    /etc/skel

  23. You have created new shell scripts and placed these scripts in the /usr/local/bin directory. You want to now add this directory to the system path. Which command do you use to do this?
  24. HOME=/usr/local/bin
    PATH=$PATH:/usr/local/bin
    SHELL=$SHELL:/usr/local/bin
    ENV=$ENV:/usr/local/bin

  25. Which command enables you to change the password to the finance group?
  26. gpasswd -a finance
    gpasswd -d finance
    gpasswd -r finance
    gpasswd finance

  27. Which configuration file contains the default values of environment variables for the Bourne Again shell (bash)?
  28. ~/.bash_logout
    ~/.bash_profile
    /etc/bashrc
    /etc/profile

  29. Suppose you want to change the name of the group from "oldstuff" to "newstuff". Which command would you use?
  30. groupmod -n -g oldstuff newstuff
    groupmod -n -o oldstuff newstuff
    groupmod -n oldstuff newstuff
    groupmod -n oldstuff newstuff

  31. Which file stores user-specific values of environment variables for the Bourne Again shell (bash)?
  32. .bash_logout
    .bash_profile
    .bashrc
    .bash_history

  33. Which command adds user "deepak" to "admin" group?
  34. gpasswd +deepak admin
    gpasswd -a deepak admin
    groupadd +deepak admin
    groupadd admin deepak

  35. Which command do you use to copy and rename a compressed kernel image file to the /boot partition?
  36. cat /usr/src/linux/arch/i386/bzImage /boot/vmlinuz-2.6.14p3
    cp -p /usr/linux/arch/i386/bzImage /boot/vmlinuz-2.6.14p3
    cp -p /usr/src/linux/arch/i386/bzImage /boot/vmlinuz-2.6.14p3
    move /usr/src/linux/arch/i386/bzImage /boot/vmlinuz-2.6.14p3

  37. What does double exclamation mark (!!) symbol in the password entry in /etc/passwd file indicate?
  38. An unsafe password has been set
    No password has been set
    There is an error in the passwod field
    The user has been blocked from logging

  39. Which command checks the consistency of group password files?
  40. grpck
    gpconv
    passwd
    pwck

  41. When a user initiates bash shell, which user specific configuration file does the system read first?
  42. ~/.bash_logout
    ~/.bash_profile
    ~/.bashrc
    /etc/profile

  43. Why can only one group be active for a user at one time?
  44. A user cannot switch between groups
    Groups determine user's file permissions
    Linux supports limited number of groups
    User can be active for multiple groups at single time

  45. Which passwd command option do you use to set max number of days that can pass before a password expires?
  46. -n
    -u
    -w
    -x

  47. Which unix command should you use to list only those processes that monitor the terminal ports for user login sessions?
  48. finger
    ps -aux | grep getty
    ps -aux | grep telnetd
    who

  49. Which command is used to login and logout from any account on the terminal?
  50. su
    sudo
    log_out
    logme

Leave a Comment