Re: The Bash Shell Startup Files

Ken Moffat <[email protected]> Mon, 10 Jun 2019 02:44:34 +0100
Newsgroups gmane.linux.lfs.general
Message-ID <[email protected]>
On Mon, Jun 10, 2019 at 12:06:40AM +0000, Hans Malissa wrote:
> Hi all,
> 
> This is not an immediate support request, I'm just trying to understand 'The Bash Shell Startup Files' (http://linuxfromscratch.org/blfs/view/stable-systemd/postlfs/profile.html) a little better.
> I'm trying to figure out what /etc/profile.d/umask.sh exactly does. As I understand, umask sets the default file permissions, but what exactly does the if statement:
> if [ "$(id -gn)" = "$(id -un)" -a $EUID -gt 99 ]
> test for?
> In LFS, in http://linuxfromscratch.org/lfs/view/stable-systemd/chapter06/createfiles.html, we created a group 'users' with GID 999; is that supposed to be the initial login group for every user?
> Thanks a lot,
> 
> Hans

For the second question, Sam's answer is correct - except that the
old approach was to put all users in a group (e.g. everyone can read
the files of other users unless they chmod them).  For those of us
who are the sole real user, not a problem.

For the -g and -u see https://www.tldp.org/LDP/abs/html/fto.html

But for the -n after -g and -u I have no idea (and I don't use the
profiles from the BLFS book : I experiment, I might have multiple
versions of things in /opt-* directories, and I don't necessarily
want to pull in any of them when compiling.)

However, you're more likely to get replies on support : chat is for
non-LFS/BLFS discussions (e.g. the price of beer).

ĸen
-- 
Before the universe began, there was a sound. It went: "One, two, ONE,
two, three, four" [...] The cataclysmic power chord that followed was
the creation of time and space and matter and it does Not Fade Away.
 - wiki.lspace.org/mediawiki/Music_With_Rocks_In


-- 
http://lists.linuxfromscratch.org/listinfo/lfs-chat
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page