1.
Which of the following statements are correct with relations to Oracle Solaris?
(2 correct answers)
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.
2.
Users must be created only in Bash shell.
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.
3.
Which of the following commands create a user named tom with home directory /export/home/tom and default Korn shell in Oracle Solaris10?
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.
4.
Which of the following commands can be used to add an existing user to a group?
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.
5.
Which of the following command lines will change the group owner of the file apple to uwinpro?
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".
6.
The command used to change the name of a group from uwinpro is,
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".
7.
Which of the following commands will take the user to his or her home directory?
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.
8.
The following commands assign a user tom to a secondary group wpgrp.
(2 correct answers)
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.
9.
Which of the following statements are correct?
(3 correct answers)
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.
10.
Which of the following are Oracle Solaris commands?
(3 correct answers)
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.