Re: The Bash Shell Startup Files

Hans Malissa <[email protected]> Mon, 10 Jun 2019 21:50:06 GMT
Newsgroups gmane.linux.lfs.general
Message-ID <[email protected]>
On June 9, 2019 at 8:01 PM, Ken Moffat <[email protected]> wrote:
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).

Thanks a lot! So what's the purpose of the 'users' group (GID 999)?
Greetings,

Hans
 

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