Other the bin group

Hello,

if I well understood, FreeBSD has many interesting default groups (bin, guest, mail, man, operator, wheel , ecc.....).

If a user belongs to the bin group, does it means that the user own general system binaries and programs ?

Please, can you clarify in more detail ?

Thanks in advance.
 
The bin group is for (legacy) compatibility reasons, it's not actually used for anything on FreeBSD.
 
ok,

if so, how should I configure a new user to have only reading and executing rights to run the programs of the bin directory (that is without I use the su command) ?
 
if so, how should I configure a new user to have only reading and executing rights to run the programs of the bin directory
You don't need to configure anything for that because that's the default behavior.
Code:
root@wintermute:~ # ls -ld /bin/
drwxr-xr-x  2 root  wheel  47 Mar  4 15:36 /bin/
root@wintermute:~ # ls -ld /usr/bin/
drwxr-xr-x  2 root  wheel  499 Mar  4 15:37 /usr/bin/
Look at those permissions, it allows "others" to read/execute.
Same for ls(1) for example:
Code:
root@wintermute:~ # ll /bin/ls
-r-xr-xr-x  1 root  wheel  34064 Mar  4 15:36 /bin/ls*

This might help: https://www.tutorialspoint.com/unix/unix-file-permission.htm
 
Ok SirDice.

Maybe pictures may help.

I login my PC like root and add a new user: picture 1.
I type F4 key and log in like imaging user, then type cd /bin and ls -lag: picture 2.

As you can see all the programs in the /bin of new user are owned by root and wheel.

My question is:

how can I change the owner and group of the programs in the new user's bin so that imaging can run them like owner ? that is how can I change (logged as root) the owner and permissions of the files under bin directory of the imaging user ? that is again: haw can I change root and wheel in imaging imaging ?

Thanks in advance.
 

Attachments

  • picture1.jpg
    picture1.jpg
    846.9 KB · Views: 171
  • picture2.jpg
    picture2.jpg
    1.2 MB · Views: 156
You don't want or need to change the owner of those files. There's no point, it has nothing to do with executing them as the owner, that's completely unrelated. The only thing that's important are the permissions. You do not want to give users the ability to write those files, that's the whole point of separating privileges.

All the ownership says is that account X created those files and account X can write to those files. Read the link I posted. Try to understand the difference between "owner", "group" and "others", then look at the different permissions you can be set for "owner", "group" and "others".
 
Ok SirDice .... I've understood what you are saying ... but how can I change (logged as root) the permissions of the files of the imaging user ?

Suppose I want to change the permissions of the user's file /dev/da3 in r-------- (400) logged as root.
Ineed to type:

root@maia:# / chmod 400 ??????

Can you help me please to complete this command ? Is this that it's difficult for me.
That is in which way root can allow permissions properties to an user.

Thanks in advance.
I
 
Ok ... but if my question is a basic stupid question, can you write the answer ? I write here because here are people that have a solid knowledgement of the unix planet. I began few month ago.
 
Look into chmod(1). But that will not apply to files in /dev as has been explained already in another thread.

As to the argument: "why can't you just explain?"... I can direct this right back at you: "why can't you just read?". No offense intended but the documentation (such as the excellent FreeBSD handbook) was created for exactly that purpose. So that others don't have to recite the same information over and over and over again.

(edit)

Also: practice makes perfect.
Code:
unicron:/home/peter $ touch test
unicron:/home/peter $ ls -l test
-rw-r--r--  1 peter  peter  0 Mar  8 21:14 test
unicron:/home/peter $ chmod 400 test
unicron:/home/peter $ ls -l test
-r--------  1 peter  peter  0 Mar  8 21:14 test
If I can do this then so can you.
 
Ok ShelLuser ... I'll continue to make practice. It is the only way. Probably my english is not clear and my questions begin to be cumbersome.


I wish to thank you for your efforts ... the code you wrote me is clear for me but is not probably clear the goal of my question.


No problem.


Thanks very much guys !!!!

See you.
 
Hey vince66,

Ok ... but if my question is a basic stupid question, can you write the answer ?
My first UNIX book is still on my shelf (printed in 1995 :eek:) and it helped me a lot.
Everything about groups and permissions is explained in that old book in the first chapter already.

That said... you ask mostly about things that are not FreeBSD specific, but simply *nix basics (though the basics are a lot to learn already).

So get yourself a good book or check the link lebarondemerde provided.
In general, help for almost every *nix command/tool can easily be found by searching for e.g. "chmod howto" or "awk tutorial".
(please refer to the Handbook and manpages first for FreeBSD commands/ports)

Matthias
 
Dear Matthias,


the problem is not the basics. Sometimes my "phisiological hard disk" (my brain) is full and I write some basics questions to remember to myself basics concepts, and also to verify if in the last FreeBSD versions, some old unix concepts are just valid or only maintained for legacy.
I'm trying to transport my knowledges of Chorus unix like OS into FreeBSD and some concepts are different from FreeBSD.

This doesn't means that I need to begin from basics. Obviously I'm checking if some basics concept are the same and I can use them in the FreeBSD also.

Again. A question can have different replies, each of one can express different and valid interpretations of the same concept.

In any case I know who, in this forum has solid knowdleges at high level (sincerely I never had contacts with nor valid replies from lebarondemerde) and very strange is also the fact that every time I pose basics questions, I receive replies, but if I ask how to configure devfs.conf, devfs.rules and devd.conf ..... the replies seems vanish.


No problem ... when I finished to fix how to configure the access block of device nodes at run time, i'll write the solution, if you enjoy.

Founamentally, it is not so difficult ... I was only searching for someone in the forum that just have did it.

Regards.

Bye bye.
 
Sometimes my "phisiological hard disk" (my brain) is full and I write some basics questions to remember to myself basics concepts, and also to verify if in the last FreeBSD versions, some old unix concepts are just valid or only maintained for legacy.
A wise man learns more from asking a dumb question than a dumb man learns from a wise answer ;)
 
Back
Top