I made a change in the blogger configuration to ease the later work when blogging. It is possible that older entries are not correctly formatted.

Sunday 27 September 2009

newgrp - (su for groups)

Well reading an old linux magazine I learnt some thing about the command: newgrp and groups in general.

First of all, the difference between primary and secondary groups in UNIX was not completely clear to me.

First of all, a primary or secondary group is the role played by a group for specific user. There is one and only one primary group per user, where as there may be a number of secondary groups (as then defined in /etc/groups.

Moreover, I learnt you could use the command: newgrp to login and perform all operation with the other group identity. It can be seen as a kind of su. Also groups may have passwords which can be set and used by their users.

I also learnt there are also sticky bits and setguid for files and that they correspond to the same functionality that setuid and the sticky bits for files.