El Fri, 28 Mar 2003 16:57:06 -0600 David Rodgers <[EMAIL PROTECTED]> escribi�:
> > What I mean is all of these tables in the schema for the mysql module > have > an autoincrement field called id at the beginning of each table that is > the > primary key for that table. > Is for uniquenes tuples, but in this case I don't think is necessarie > The big problem with this is that the database will allow you to add an > unlimited > number of users to to the radcheck table with different passwords like > this. > > id UserName Attribute op Value > 1 bob Password == > somepassword > 2 bob Password == > somepassword > 3 bob Password == > somepassword > 4 bob Framed-IP-Address == 192.168.37.5 > > Some would argue that this isn't a big deal but in order to maintain > some kind of integrity and use this as more than an excel spreadsheet > you need to dump the autoincrement field and used the Username field > and the Attribute field together to key off of then it would allow you > to > still have multiple usernames but not multiple usernames with the same > attribute. > Since you certainly wouldn't want to have more than one user setup with > different passwords in a database for use as an authentication device. > > That way this would still be possible > > id UserName Attribute op Value > 1 bob Password == > somepassword > 2 bob Framed-IP-Address == 192.168.37.5 > > but not this > > id UserName Attribute op Value > 1 bob Password == > somepassword > 2 bob Password == > somepassword > 3 bob Password == > somepassword > 4 bob Framed-IP-Address == 192.168.37.5 > I modified the table for my needs, I find this "peculiarity" and dealed with it adding a multiple unique index like this: -------------------------------------- # # Table structure for table `radcheck` # CREATE TABLE radcheck ( id int(11) unsigned NOT NULL auto_increment, UserName varchar(64) NOT NULL default '', Attribute varchar(32) NOT NULL default '', op char(2) NOT NULL default '', Value varchar(253) NOT NULL default '', PRIMARY KEY (id), UNIQUE KEY unico (UserName,Attribute) ) TYPE=MyISAM; ---------------------------------------- this way I can have unique Username, Attributes hope this helps... -- Pablo Veliz - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
