Problem
When I add users with either "scoadmin" or "useradd", I want to ensure that their .profiles are always the same, no matter which of these two utilities I choose to use.
Cause
When a new user is added by "useradd" or within "scoadmin account", the user's default .profile is taken from a "skel" subdirectory.
"useradd" takes it from /etc/skel "scoadmin account" takes it from /usr/lib/scoadmin/account/skel
Solution
To make them the same, run the following commands:
mkdir /local
find /etc/skel -print | cpio -pdumv /local
ln -s /usr/lib/scoadmin/account/skel /etc/skelNow, when you add a user via "useradd" or "scoadmin account", their .profiles will be the same.
The original /etc/skel is copied to /local/skel, should you wish to use the .profile there as a preference.
Other files that are copied in are:
<pre>
-rw-r--r-- 1 testuser other 480 May 24 09:42 .cshrc
-rw-r--r-- 1 testuser other 20 Jun 25 08:57 .env
-rw-r--r-- 1 testuser other 932 May 24 09:42 .kshrc
-rw-r--r-- 1 testuser other 642 May 24 09:42 .login
-rw-r--r-- 1 testuser other 822 May 24 09:42 .profile
-rw------- 1 testuser other 32 Jun 25 09:11 .sh_history
-rw-r--r-- 1 testuser other 51 May 24 09:22 .vtlrc
</pre>
Alternatively, you can also run the "useradd" command with the "-k"
option to specify a different skel directory other than /etc/skel.NOTE: The default $PATH for "root" is /sbin:/usr/sbin:/usr/bin:/etc which
is defined by the "login" binary. Other users is /usr/bin.This can be reset by either /etc/profile or the user's .profile in their $HOME directory.
See also
useradd(1M)See the online documentation located at:http://<my_server>:457