Gentoo Archives: gentoo-user

From: Alan McKinnon <alan.mckinnon@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Updating $PATH variable permanently for root not working
Date: Mon, 06 Jan 2014 21:04:46
Message-Id: 52CB1A55.4090808@gmail.com
In Reply to: Re: [gentoo-user] Updating $PATH variable permanently for root not working by Michael Orlitzky
1 On 06/01/2014 00:05, Michael Orlitzky wrote:
2 > On 01/05/2014 04:14 PM, Alan McKinnon wrote:
3 >>
4 >>
5 >> This way everything is still unbelievably complex but at least the
6 >> visible problems mostly just go away
7 >>
8 >
9 > There is an apparently empty directory, /etc/skel, that upon closer
10 > inspection contains some nice default bash junk:
11 >
12 > $ ls -a /etc/skel/
13 > total 32K
14 > drwxr-xr-x 3 root root 4.0K 2013-06-06 10:53 .
15 > drwxr-xr-x 113 root root 12K 2014-01-05 01:24 ..
16 > -rw-r--r-- 1 root root 127 2013-06-06 10:53 .bash_logout
17 > -rw-r--r-- 1 root root 193 2013-06-06 10:53 .bash_profile
18 > -rw-r--r-- 1 root root 551 2013-06-06 10:53 .bashrc
19 > drwx------ 2 root root 4.0K 2007-11-23 14:25 .ssh
20 >
21 > The 'useradd' program {might,should} install these for you; if not it
22 > can be coaxed into it with the --skel flag.
23 >
24 > The .bash_profile in there does what Alan suggests.
25
26 Ah, but there's a snag with the root account which is what Charles is using
27
28 "useradd root" is never run on a Unix boot and /etc/skel is only copied
29 over by using useradd. The root account is created at install time
30 unpacking the stage 3 IIRC so the profiles it gets are whatever is in
31 the tarball.
32
33 To get /etc/skel for root, one has to copy the file.
34 I keep forgetting to do this myself on installs, this the main reason
35 why I know more about bash startup than I should :-)
36
37 --
38 Alan McKinnon
39 alan.mckinnon@×××××.com