Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

hesiod_free_passwd(3) [debian man page]

HESIOD(3)						     Library Functions Manual							 HESIOD(3)

NAME
hesiod_getpwnam, hesiod_getpwuid, hesiod_free_passwd - Hesiod functions for retrieving passwd information SYNOPSIS
#include <hesiod.h> struct passwd *hesiod_getpwnam(void *context, const char *name) struct passwd *hesiod_getpwuid(void *context, uid_t uid) void hesiod_free_passwd(void *context, struct passwd *pw) cc file.c -lhesiod DESCRIPTION
This family of functions allows you to retrieve passwd database information using Hesiod. To perform lookups, you need an initialized Hes- iod context; see hesiod(3) for details. You may look up passwd information by name or by uid; information is returned in the same format as by getpwnam or getpwuid. It is the caller's responsibility to call hesiod_free_passwd with the returned passwd entry to free the resources used by the passwd entry. Hesiod queries for passwd information are made using the ``passwd'' or ``uid'' Hesiod type, using either the username or the decimal repre- sentation of the uid as the Hesiod name. The corresponding records should be a colon-separated list of fields giving the username, encrypted password, uid, gid, GECOS information, home directory, and shell of the user. RETURN VALUES
On failure, hesiod_getpwnam and hesiod_getpwuid return NULL and set the global variable errno to indicate the error. ERRORS
These calls may fail for any of the reasons the routine hesiod_resolve may fail. SEE ALSO
hesiod(3) 30 November 1996 HESIOD(3)

Check Out this Related Man Page

HESIOD(3)						     Library Functions Manual							 HESIOD(3)

NAME
hesiod_getpwnam, hesiod_getpwuid, hesiod_free_passwd - Hesiod functions for retrieving passwd information SYNOPSIS
#include <hesiod.h> struct passwd *hesiod_getpwnam(void *context, const char *name) struct passwd *hesiod_getpwuid(void *context, uid_t uid) void hesiod_free_passwd(void *context, struct passwd *pw) cc file.c -lhesiod DESCRIPTION
This family of functions allows you to retrieve passwd database information using Hesiod. To perform lookups, you need an initialized Hes- iod context; see hesiod(3) for details. You may look up passwd information by name or by uid; information is returned in the same format as by getpwnam or getpwuid. It is the caller's responsibility to call hesiod_free_passwd with the returned passwd entry to free the resources used by the passwd entry. Hesiod queries for passwd information are made using the ``passwd'' or ``uid'' Hesiod type, using either the username or the decimal repre- sentation of the uid as the Hesiod name. The corresponding records should be a colon-separated list of fields giving the username, encrypted password, uid, gid, GECOS information, home directory, and shell of the user. RETURN VALUES
On failure, hesiod_getpwnam and hesiod_getpwuid return NULL and set the global variable errno to indicate the error. ERRORS
These calls may fail for any of the reasons the routine hesiod_resolve may fail. SEE ALSO
hesiod(3) 30 November 1996 HESIOD(3)
Man Page

12 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

etc/passwd

Can anyone explain the second and third fields in /etc/passwd. Thanks. (2 Replies)
Discussion started by: nguda
2 Replies

2. Shell Programming and Scripting

Creating an entry for /etc/passwd

given an input file containing fields seperated by "," how do I retrieve information of these fields, do some work on them, then create a new input to the etc/passwd file? someone told me to look at the "sed" command but I still cant seem to get over this problem. I want to work on the data so... (8 Replies)
Discussion started by: sleepster
8 Replies

3. Shell Programming and Scripting

Scripts for IDīs free in /etc/passwd

As extracting of the file /etc/passwd the IDīs that have not been used in a range specifies. (2 Replies)
Discussion started by: oscar_acm
2 Replies

4. Shell Programming and Scripting

how to extract fields for /etc/passwd

hi, i would like to extract the just name field from /etc/passwd file, and nothing else. ie grep pauline, and Pauline Fowler comes back. cheeers paul mc (6 Replies)
Discussion started by: mopimp
6 Replies

5. AIX

Look into this and suggest if any changes needed

Hi, I am new script programming, I have written a script shown velow to read username and passwd from /etc/security/passwd, i am able to read username, but unable to grep lastupdate. please look into the code and suggest if any changes need. #!/bin/ksh USERNAME="" fname=/usr/bin/lastupdate... (1 Reply)
Discussion started by: me_haroon
1 Replies

6. Shell Programming and Scripting

Shell Parameter...

I am trying to get the value of the user id (uid), which is the shell parameter.Then, read the /etc/passwd and keep the lines where the uid is superior to the parameter and write this line in a new file. But I am not getting what I wanted. Perhaps there is a problem with the Syntax below :- ... (1 Reply)
Discussion started by: marconi
1 Replies

7. Forum Support Area for Unregistered Users & Account Problems

hi

please send my username, and passwd (0 Replies)
Discussion started by: uthrpathy
0 Replies

8. Shell Programming and Scripting

Manipulating the etc/passwd file with sed

How can i use sed to extract the user name and home directory from the /etc/passwd/ file on my server. (11 Replies)
Discussion started by: Pauline mugisha
11 Replies

9. Shell Programming and Scripting

Number of users in passwd

This command prints out username/users in /etc/passwd: cut -d ':' -f '1,5' /etc/passwd | sort I wonder if I also, after above commands output, can get an output that lists number of users in the group? I need to use uniq to get rid of duplicates. Iīve tried this, but cant get it right, can... (5 Replies)
Discussion started by: oskis
5 Replies

10. Shell Programming and Scripting

Compare two files and set a third one using awk or perl

Folks I need your help cuz I've a file with 100,000 records that need to be compared against a passwd file (300) and then create a third one with the data in the first one and the passwd from the second one set in it. The format of the first file is: host xxxxxx "" 0,0 Closed control00/... (4 Replies)
Discussion started by: ranrodrig
4 Replies

11. Shell Programming and Scripting

What is a type of this variable?

I have a question about the type of this variable checkU= sudo cat /etc/passwd: grep $uname: wc -l I write a script to check the existent of username that get from the keyboard. If there is no username,it will create the username else it show the 'Duplicate name" message. The problem is it... (4 Replies)
Discussion started by: thsecmaniac
4 Replies

12. Shell Programming and Scripting

Cut fields from /etc/passwd file into variables?

The script must ask the user to enter the user name and check whether the user exists in /etc/passwd (you must allow the partial usernames also). If the username exists, display the details as: List of users Login Name: User ID: ... (3 Replies)
Discussion started by: nobletechnology
3 Replies