nss-mysql-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Nss-mysql-users] Group Support


From: Jefferson Cowart
Subject: [Nss-mysql-users] Group Support
Date: Tue, 25 Jun 2002 19:27:27 -0700

I was finally able to get nss-mysql installed and configured properly (I
think). I am able to put users into my mysql db and see them with a
"getent passwd" and "getent shadow". However I can't seem to see the
group I made in the groups table. Below I have put the relevant sections
of my config files and dumps from mysql DB. I am running the current
version of nss-mysql (0.37.1) and mysql 3.23.46. Any
suggestions/pointers would be appreciated. TIA

===============================================================
Configuration File
===============================================================

# This is the groups configuration part
# This is only used if you have enabled the group support

# group_info_table: table containing group_name_column,groupid_column
# and gid_column
groups.group_info_table = groups;

# where_clause: a clause that a group must respect to be considered
valid.
# It is useful to enable only some groups of your database.
# Can be empty
# All fields must be fully qualified, i.e. written as table.field
groups.where_clause = groups.status = 'A';

# avoid_initgroups_for: for that user, initgroups will always return
# "not found", you should set it to your MySQL user.
# Can be empty
groups.avoid_initgroups_for = mysql;

# group_name_column: column containing the UNIX group names
# The field name must be fully qualified, i.e. written as table.field
groups.group_name_column = groups.group_name;

# groupid_column: should be the PRIMARY KEY of the table
# This information is used as a FOREIGN KEY in groups.members_table
# The field name must be fully qualified, i.e. written as table.field
groups.groupid_column = groups.group_id;

# gid_column: column containing the UNIX GID of the groups
# If you upgrade from 0.22 and older, you can keep the old behavior
using
# something like the following: (2000 would be your old first_gid)
# groups.gid_column = 2000+group_id
# This is useful too if you do not have a GID column in your database
# The field name must be fully qualified, i.e. written as table.field
groups.gid_column = groups.gid;

# password_column: column containing the UNIX password of the groups
#
# The name of this column MUST BE different from ANY columns defined
# in user.table and groups.members_table
#
# If you don't have such a column, you should use something like
# groups.password_column = "x";
# The field name must be fully qualified, i.e. written as table.field
groups.password_column = groups.group_password;

# members_table: table containing member_{userid,groupid}_column.
# This reproduce /etc/group role by using SQL JOIN.
# See sample.sql if you don't understand what I(it) mean(s)
# The field name must be fully qualified, i.e. written as table.field
groups.members_table = user_group;

# member_{userid,groupid}_column
# FOREIGN KEYS of users.user_id and groups.group_id
# for each row, user represented by its user_id a member
# of the group represented by its group_id
# The field name must be fully qualified, i.e. written as table.field
groups.member_userid_column = user_group.user_id;
# The field name must be fully qualified, i.e. written as table.field
groups.member_groupid_column = user_group.group_id;

===============================================================
DB Dump
===============================================================
#
# Table structure for table `groups`
#

CREATE TABLE groups (
  group_id int(11) NOT NULL auto_increment,
  group_name varchar(30) NOT NULL default '',
  status char(1) default 'A',
  group_password varchar(64) NOT NULL default 'x',
  gid int(11) NOT NULL default '-1',
  PRIMARY KEY  (group_id),
  UNIQUE KEY groupname (group_name),
  UNIQUE KEY gid (gid)
) TYPE=MyISAM;

#
# Dumping data for table `groups`
#

INSERT INTO groups VALUES (1, 'testgroup', 'A', 'x', 1000);
# --------------------------------------------------------

#
# Table structure for table `user_group`
#

CREATE TABLE user_group (
  user_id int(11) NOT NULL default '0',
  group_id int(11) NOT NULL default '0',
  UNIQUE KEY user-group (user_id,group_id)
) TYPE=MyISAM;

#
# Dumping data for table `user_group`
#

INSERT INTO user_group VALUES (1005, 1000);




----------------
Thanks
Jefferson Cowart
address@hidden 

Support Open Instant Messaging Protocols
http://www.petitiononline.com/openIM/petition.html




reply via email to

[Prev in Thread] Current Thread [Next in Thread]