Unix - Users And Groups

Approved & Edited by ProProfs Editorial Team
The editorial team at ProProfs Quizzes consists of a select group of subject experts, trivia writers, and quiz masters who have authored over 10,000 quizzes taken by more than 100 million users. This team includes our in-house seasoned quiz moderators and subject matter experts. Our editorial experts, spread across the world, are rigorously trained using our comprehensive guidelines to ensure that you receive the highest quality quizzes.
Learn about Our Editorial Process
| By Uwinpro
U
Uwinpro
Community Contributor
Quizzes Created: 25 | Total Attempts: 13,385
Questions: 10 | Attempts: 296

SettingsSettingsSettings
Operating System Quizzes & Trivia

Test your UNIX (Solaris) skills.
Good Luck !


Questions and Answers
  • 1. 

    Which of the following statements are correct with relations to Oracle Solaris? (2 correct answers)

    • A.

      SunOS 5.10 and Oracle Solaris 10 are the same

    • B.

      Command uname –n shows the host name

    • C.

      Command hostname does not show host name

    • D.

      Command logins shows users logged in

    Correct Answer(s)
    A. SunOS 5.10 and Oracle Solaris 10 are the same
    B. Command uname –n shows the host name
    Explanation
    SunOS 5.10 and Oracle Solaris 10 are the same: This statement is correct because SunOS 5.10 is the version number for Oracle Solaris 10, which means they refer to the same operating system.

    Command uname –n shows the host name: This statement is correct because the uname –n command is used in Oracle Solaris to display the host name of the system.

    Rate this question:

  • 2. 

    Users must be created only in Bash shell.

    • A.

      True

    • B.

      False

    Correct Answer
    B. False
    Explanation
    The statement is false because users can be created in multiple shells, not just in Bash. Other shells such as Zsh, Ksh, and Csh also allow the creation of users. Therefore, it is not necessary to use Bash shell exclusively for creating users.

    Rate this question:

  • 3. 

    Which of the following commands create a user named tom with home directory /export/home/tom and default Korn shell in Oracle Solaris10?

    • A.

      Adduser –d /export/home/tom –m tom –s /bin/ksh

    • B.

      Useradd –d /export/home/tom –m tom –s /bin/ksh

    • C.

      Useradd –d /export/home/tom –m –s /bin/ksh tom

    • D.

      Useradd tom

    Correct Answer
    C. Useradd –d /export/home/tom –m –s /bin/ksh tom
    Explanation
    The correct answer is "useradd –d /export/home/tom –m –s /bin/ksh tom". This command creates a user named "tom" with the home directory "/export/home/tom" and sets the default shell to Korn shell (/bin/ksh) in Oracle Solaris10. The "-d" option specifies the home directory, the "-m" option creates the home directory if it doesn't exist, the "-s" option sets the default shell, and "tom" is the username.

    Rate this question:

  • 4. 

    Which of the following commands can be used to add an existing user to a group?

    • A.

      Groupmod

    • B.

      Usermod

    • C.

      Groupadd

    • D.

      Useradd

    Correct Answer
    B. Usermod
    Explanation
    The correct answer is usermod. The usermod command is used to modify user accounts in Linux. One of its functionalities is to add an existing user to a group. This can be done by specifying the -aG option followed by the group name and the username. This command is useful when a user needs to be added to an existing group without creating a new user or group.

    Rate this question:

  • 5. 

    Which of the following command lines will change the group owner of the file apple to uwinpro?

    • A.

      Groupmod uwinpro apple

    • B.

      Chown uwinpro apple

    • C.

      Chgrp –g uwinpro apple

    • D.

      Chgrp uwinpro apple

    Correct Answer
    D. Chgrp uwinpro apple
    Explanation
    The correct answer is "chgrp uwinpro apple". The chgrp command is used to change the group ownership of a file or directory. In this case, it will change the group owner of the file "apple" to "uwinpro".

    Rate this question:

  • 6. 

    The command used to change the name of a group from uwinpro is,

    • A.

      Groupname uwinpro newgrp

    • B.

      Groupchange –n newgrp uwinpro

    • C.

      Groupmod –n newgrp uwinpro

    • D.

      Groupmod –n uwinpro newgrp

    Correct Answer
    C. Groupmod –n newgrp uwinpro
    Explanation
    The correct answer is "groupmod –n newgrp uwinpro". This is because the "groupmod" command is used to modify group attributes, and the "-n" option is used to specify the new name for the group. In this case, the new name is "newgrp" and the current name is "uwinpro". Therefore, the correct command to change the name of the group from "uwinpro" to "newgrp" is "groupmod –n newgrp uwinpro".

    Rate this question:

  • 7. 

    Which of the following commands will take the user to his or her home directory?

    • A.

      Cd /export/home

    • B.

      Cd (ENTER)

    • C.

      Cd /home

    • D.

      CD (ENTER)

    Correct Answer
    B. Cd (ENTER)
    Explanation
    The command "cd (ENTER)" will take the user to his or her home directory. The "cd" command is used to change the current working directory, and when used without any arguments, it automatically takes the user to their home directory. The "(ENTER)" part indicates that the user needs to press the enter key after typing the command.

    Rate this question:

  • 8. 

    The following commands assign a user tom to a secondary group wpgrp. (2 correct answers)

    • A.

      Useradd –g wpgrp tom

    • B.

      Useradd –d /export/home/tom –m –G wpgrp tom

    • C.

      Usermod –g wpgrp tom

    • D.

      Usermod –G wpgrp tom

    Correct Answer(s)
    B. Useradd –d /export/home/tom –m –G wpgrp tom
    D. Usermod –G wpgrp tom
    Explanation
    The correct answers are "useradd –d /export/home/tom –m –G wpgrp tom" and "usermod –G wpgrp tom" because these commands both assign the user "tom" to the secondary group "wpgrp". The "useradd" command with the "-d" flag sets the home directory for the user to "/export/home/tom" and the "-m" flag creates the home directory if it does not already exist. The "-G" flag adds the user to the specified group. The "usermod" command with the "-G" flag also adds the user to the specified group.

    Rate this question:

  • 9. 

    Which of the following statements are correct? (3 correct answers)

    • A.

      Groups are saved in a file /etc/group

    • B.

      Only primary group members are recorded in /etc/group

    • C.

      A user can be a member of 15 secondary groups

    • D.

      Users get file system permissions from secondary group memberships

    Correct Answer(s)
    A. Groups are saved in a file /etc/group
    C. A user can be a member of 15 secondary groups
    D. Users get file system permissions from secondary group memberships
    Explanation
    The statement "Groups are saved in a file /etc/group" is correct because in Unix-like operating systems, the /etc/group file is used to store information about groups.

    The statement "A user can be a member of 15 secondary groups" is correct because in Unix-like operating systems, a user can be a member of multiple groups, with one primary group and multiple secondary groups. The maximum number of secondary groups a user can belong to is typically set to 16, with one slot reserved for the primary group.

    The statement "Users get file system permissions from secondary group memberships" is correct because in Unix-like operating systems, file system permissions can be set for groups. When a user is a member of a group that has specific permissions on a file or directory, they inherit those permissions.

    Rate this question:

  • 10. 

    Which of the following are Oracle Solaris commands? (3 correct answers)

    • A.

      Id

    • B.

      Groups

    • C.

      Chgrp

    • D.

      Addusers

    Correct Answer(s)
    A. Id
    B. Groups
    C. Chgrp
    Explanation
    The correct answer is id, groups, and chgrp. These three commands are all Oracle Solaris commands. The "id" command is used to display the user and group identities, while the "groups" command is used to display the groups that a user belongs to. The "chgrp" command is used to change the group ownership of a file or directory. The "addusers" command is not an Oracle Solaris command, so it is not included in the correct answer.

    Rate this question:

Quiz Review Timeline +

Our quizzes are rigorously reviewed, monitored and continuously updated by our expert board to maintain accuracy, relevance, and timeliness.

  • Current Version
  • Mar 21, 2023
    Quiz Edited by
    ProProfs Editorial Team
  • Oct 03, 2012
    Quiz Created by
    Uwinpro
Back to Top Back to top
Advertisement
×

Wait!
Here's an interesting quiz for you.

We have other quizzes matching your interest.