You have edited /etc/profile to include the lines:
dennis_says=hello
export dennie_says
You have also edited /etc/skel/local.profile to include the line:
dennis_says=world
You now create a new user account brian, and specify use of the bash shell. When brian logs in and enters
Echo $dennis_says
What will he see, and why?
A.
world, because the local.profile entry will be executed last
B.
hello, because the global /etc/profile entry overrides the local.profile entry
C.
hello, because the local.profile entry is not automatically sourced on login
D.
hello, because the value specified in local.profile was not exported
E.
nothing, because the variable was not exported in local.profile
Explanation:
The $HOME/.profile file is an initialization file that is executed after the /etc/profile when logging in to the Bourne
or Korn shell. The file contains user preferences for variable settings. If the ENV variable is set to .kshrc, the
.kshrc file executes every time a new shell begins execution. The $HOME/.profile is copied from the /etc/skel/
local.profile file by the Administration Tool when creating a new account.
Note: /etc/skel/local.profile
Per-system configuration file for
sh/ksh/ksh93/bash login sessions,
installed for new users