PreguntasLinux

Versión Completa: groups en gentoo que alguien me explique!
Actualmente estas viendo una versión simplificada de nuestro contenido. Para ver la versión completa en el formato correcto, dale click aquí
zodman@localhost ~ $ groups
wheel zodman
zodman@localhost ~ $ groups zodman
wheel audio zodman

Como no sale el grupo audio en los comandos ?
Si la informacion la toma del mismo archivo (/etc/groups) como es posible esto ?

zodman@localhost ~ $ cat /etc/group
root::0:root
bin::1:root,bin,daemon
daemon::2:root,bin,daemon
sys::3:root,bin,adm
adm::4:root,adm,daemon
tty::5:
disk::6:root,adm,haldaemon
lp::7:lp
mem::8:
kmem::9:
wheel::10:root,zodman
floppy::11:root,haldaemon
mail::12:mail
news::13:news
uucp::14:uucp
man::15:man
console::17:
audio:!:18:zodman
cdrom::19:haldaemon
dialout::20:root
tape::26:root
video::27:root
cdrw::80:haldaemon
usb::85:haldaemon
users:100games
nofiles:x:200:
smmsp:x:209:smmsp
portage::2501-razzortage
utmp:x:406:
nogroup::65533:
nobody::65534:
ldap:x:439:
sshd:x:22:
locate:x:245:
ipw3945d:x101
messagebus:x:440:
stb-admin:x:441:
haldaemon:x:442:haldaemon
plugdev:x:443:haldaemon
games:x:35:
netdev:x:444:
avahi:x:445:
gdm:x:446:
zodman:x:1000:zodman

zodman Escribió:
audio:!:18:zodman
cdrom::19:haldaemon

desasnenme tambien: Es normal el '!' entre los : : ??

me parece que es porque tienen contraseña.
Si temes problemas puedes chequear con: grpck

no suele estar muy documentado, hay que reclamar a rms a David MacKenzie.

Description
/etc/group is an ASCII file which defines the groups to which users belong. There is one entry per line, and each line has the format:

group_name1-razzasswd:GID:user_list

The field descriptions are:

group_name
the name of the group.
password
the (encrypted) group password. If this field is empty, no password is needed.
GID
the numerical group ID.
user_list
all the group member's user names, separated by commas.
y ya que estamos:

grpck - verify integrity of group files
Synopsis

grpck [-r] [group shadow]

Description

grpck verifies the integrity of the system authentication information. All entries in the /etc/group and /etc/gshadow are checked to see that the entry has the proper format and valid data in each field. The user is prompted to delete entries that are improperly formatted or which have other uncorrectable errors.

Checks are made to verify that each entry has:

* the correct number of fields
* a unique group name
* a valid list of members and administrators

The checks for correct number of fields and unique group name are fatal. If the entry has the wrong number of fields, the user will be prompted to delete the entire line. If the user does not answer affirmatively, all further checks are bypassed. An entry with a duplicated group name is prompted for deletion, but the remaining checks will still be made. All other errors are warnings and the user is encouraged to run the groupmod command to correct the error.

The commands which operate on the /etc/group file are not able to alter corrupted or duplicated entries. grpck should be used in those circumstances to remove the offending entry.
Options

By default, grpck operates on the files /etc/group and /etc/gshadow. The user may select alternate files with the group and shadow parameters. Additionally, the user may execute the command in read-only mode by specifying the -r flag. This causes all questions regarding changes to be answered no without user intervention. grpck can also sort entries in /etc/group and /etc/gshadow by GID. To run it in sort mode pass it -s flag. No checks are performed then, it just sorts.
Files

/etc/group
Group account information.
/etc/gshadow
Secure group account information.
/etc/passwd
User account information.


y solo para aprovechar el tema y documentar un poco:


group.conf - configuration file for the pam_group module
Description

The pam_group PAM module does not authenticate the user, but instead it grants group memberships (in the credential setting phase of the authentication module) to the user. Such memberships are based on the service they are applying for.

For this module to function correctly there must be a correctly formatted /etc/security/group.conf file present. White spaces are ignored and lines maybe extended with '\' (escaped newlines). Text following a '#' is ignored to the end of the line.

The syntax of the lines is as follows:

services;ttys;users;times;groups

The first field, the services field, is a logic list of PAM service names that the rule applies to.

The second field, the tty field, is a logic list of terminal names that this rule applies to.

The third field, the users field, is a logic list of users or a netgroup of users to whom this rule applies.

For these items the simple wildcard '*' may be used only once. With netgroups no wildcards or logic operators are allowed.

The times field is used to indicate "when" these groups are to be given to the user. The format here is a logic list of day/time-range entries. The days are specified by a sequence of two character entries, MoTuSa for example is Monday Tuesday and Saturday. Note that repeated days are unset MoMo = no day, and MoWk = all weekdays bar Monday. The two character combinations accepted are Mo Tu We Th Fr Sa Su Wk Wd Al, the last two being week-end days and all 7 days of the week respectively. As a final example, AlFr means all days except Friday.

Each day/time-range can be prefixed with a '!' to indicate "anything but". The time-range part is two 24-hour times HHMM, separated by a hyphen, indicating the start and finish time (if the finish time is smaller than the start time it is deemed to apply on the following day).

The groups field is a comma or space separated list of groups that the user inherits membership of. These groups are added if the previous fields are satisfied by the user's request.

For a rule to be active, ALL of service+ttys+users must be satisfied by the applying process.
Examples

These are some example lines which might be specified in /etc/security/group.conf.

Running 'xsh' on tty* (any ttyXXX device), the user 'us' is given access to the floppy (through membership of the floppy group)


xsh;tty*&!ttyp*;us;Al0000-2400;floppy

Running 'xsh' on tty* (any ttyXXX device), the user 'sword' is given access to games (through membership of the floppy group) after work hours.


xsh; tty* ;sword;!Wk0900-1800;games, sound
xsh; tty* ;*;Al0900-1800;floppy

http://www.die.net/
te sirvió en algo zodman?
haciendo
cat /etc/group|grep !
grep ! /etc/shadow
me salen la correspondencia. ok

¿que te sugiere esto?
cat /etc/group|grep audio
audio:x:17:

En cambio tú tienes:
audio:!:18:zodman

audio está en el grupo zodman con clave, no?
URLs de Referencia