![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Rules & FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| High Level Programming Post questions about C, C++, Java, SQL, and other programming languages here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| test for function name? | duderonomy | UNIX for Advanced & Expert Users | 5 | 05-14-2008 03:52 AM |
| Check existence of a login | xavier054 | UNIX for Advanced & Expert Users | 10 | 03-06-2008 07:19 AM |
| function to test if file is open | johnsonbryce | Shell Programming and Scripting | 3 | 03-10-2006 01:15 PM |
| how to test for file existence using file size? | forevercalz | Shell Programming and Scripting | 3 | 10-26-2005 07:02 PM |
| C function to test string or integer | qqq | High Level Programming | 3 | 03-09-2005 09:55 PM |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
Hi everybody,
I need to check in C program whether a given login is known on the system. Is there any system function that could do this ? So far, all I could find is getpwnam(), which answers my problem by parsing the local password database. But won't work if a user is authenticated by other means (PAM, Kerberos, ...). I am surprised not to have found anything on that topic, because any shell is able to resolve a user's HOME while doing the tilde expansion, but how is it done? I had a look at the shell C sources, but I am a bit lost. Also, I don't have a system with network authentication handy, so I can't ktrace /bin/sh while doing a tilde expansion to see what function is called... Thanks in advance, any help much appreciated. Xavier |
| Forum Sponsor | ||
|
|
|
|||
| Google UNIX.COM |