[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
system user database
As far as i understood, OpenBSD uses a db database to store users info in
the system. /etc/passwd and /etc/master.passwd
being rebuilt after a call to pwd_mkdb. Fields are separated using the ':'
delimiter (i recall seeing that in user.c) and we use the
getpwnam() to fill in a (struct passwd *) where we can access the data. My
question is the following: if we use getpwnam with
a login as a key to retrieve the fields, does it mean that the system keeps
four separate db databases (one for the getpwnam(),
one for the getpwuid(), one for the getgrnam() and one for the getgrgid()
syscalls) ? If it doesn't, how does it accesses the values
in other words, what does it uses as a key ?
I am developping a tool to allow users to change informations about their
accounts on the system via a web interface (a big mix
of php, perl, c and sh that calls sudo when data is parsed) and I am
searching for the best solution to store and retrieve data for
these users without using a sgbdr or any kind of database running as a
service (mysql, postgresql and/or ldap are not options).
Thanks for your help ;)
veins