LFS /tools/bin/groups not displaying supplementary groups
Always good to become the newbie again :)
So i am at the stage of about to install the basic system and am using a derivation of the package management provided by Matthias S. Benkmann. To this end I am using his useradd and groupadd scripts to update the files: /etc/passwd /etc/group My issue is that when I run the commands(created as part of temporary system when installing coreutils): Code:
/tools/bin/su linux This only returns the user being in the group named after user but not the additional group of 'install' Also, prior to logging in as user, if I use this command as root: Code:
/tools/bin/groups linux Lines from relevant files look like: Code:
#/etc/passwd Cheers grail |
Any pointer to Matthias S. Benkmann's scripts? What is the script code? What are they supposed to do, what did you expect them to do, and what is it actually doing?
|
You're in the LFS book, chapter 5?
They say FBBG Follow Book - Book Good. What page are you on? Or is this an external trick, in which case you're on your own. I don't think you need users to start chapter 6. In chapter 6, you're in a chroot to /tools, so you don't see /tools |
@Agrouf - Yes I used "Matthias S. Benkmann's scripts" as a guideline.
useradd: Code:
if [ $# -ne 11 -o z$1 != z-d -o z$3 != z-g -o z$5 != z-G -o z$7 != z-s -o z$9 != z-u ]; then Code:
if [ $# -ne 3 -o z$1 != z-g ]; then @business_kid - I am on page 6.7 Linux-2.6.34 API Headers. Your following statement is not quite correct: Quote:
eg. Code:
export LFS=/mnt/lfs Then the chroot is: Code:
chroot "$LFS" /tools/bin/env -i \ Upshot is, I am still stuck with root being able to get the right groups with the command but not a user who is being su'ed into. |
Quote:
I understood you want linux in groups linux and install. It looks like /etc/group contains the right groups but /mnt/lfs/etc/group does not contain it? Could you please post the commands you type one by one, the result you get and the result you expect? something like that: I type this: $ ls file1 file2 file3 And I expect this: $ ls file4 |
Sorry, I've reread a 4th time and I think I get it now.
Basically, you do this: Code:
# /tools/bin/groups linux Code:
# /tools/bin/groups linux Is /tools/etc/groups readable by everybody? It should be 644 |
No probs :)
As root in chroot environment: Code:
root# groups linux |
Yes that's what I expect and yes it is readable.
|
Ok ... so I have done some more testing and thought I would also explain why I thought this was necessary:
1. Extra testing - interestingly, even though when the user runs groups command on its own it does not display the extra group(s), if I submit the following: Code:
linux$groups linux Quote:
2. Reason for query - i was installing another program, man-pages, and this is done as the man-pages user. As per the LFS instructions the install is very simply: Code:
make install Code:
for i in man?; do \ Now as part of LFS you create these directories already and also: Quote:
On executing the first line in the "for" example above the script hits an error that permission is denied on changing the permissions, hence why I looked to see what groups had been assigned to the user, in this case man-pages (linux was just shorter to type before), and on typing in the "groups" command was told that man-pages (and later i found linux also) was not considered in the install group :( I have since made a change to the Makefile to test if folder already exists and only then use the install -d -m line. My question now I guess two fold: 1. Still why the erroneous output when submitting just the "groups" command as normal user? 2. Was this lack of acknowledgement of the install group the reason why the man-pages user was unable to execute the following example: Code:
install -d -m 755 /usr/share/man/man1 |
All times are GMT -5. The time now is 02:19 PM. |