On 06/01/2014 00:05, Michael Orlitzky wrote:
> On 01/05/2014 04:14 PM, Alan McKinnon wrote:
>>
>>
>> This way everything is still unbelievably complex but at least the
>> visible problems mostly just go away
>>
> 
> There is an apparently empty directory, /etc/skel, that upon closer
> inspection contains some nice default bash junk:
> 
>   $ ls -a /etc/skel/
>   total 32K
>   drwxr-xr-x   3 root root 4.0K 2013-06-06 10:53 .
>   drwxr-xr-x 113 root root  12K 2014-01-05 01:24 ..
>   -rw-r--r--   1 root root  127 2013-06-06 10:53 .bash_logout
>   -rw-r--r--   1 root root  193 2013-06-06 10:53 .bash_profile
>   -rw-r--r--   1 root root  551 2013-06-06 10:53 .bashrc
>   drwx------   2 root root 4.0K 2007-11-23 14:25 .ssh
> 
> The 'useradd' program {might,should} install these for you; if not it
> can be coaxed into it with the --skel flag.
> 
> The .bash_profile in there does what Alan suggests.

Ah, but there's a snag with the root account which is what Charles is using

"useradd root" is never run on a Unix boot and /etc/skel is only copied
over by using useradd. The root account is created at install time
unpacking the stage 3 IIRC so the profiles it gets are whatever is in
the tarball.

To get /etc/skel for root, one has to copy the file.
I keep forgetting to do this myself on installs, this the main reason
why I know more about bash startup than I should :-)

-- 
Alan McKinnon
alan.mckin...@gmail.com


Reply via email to