![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Advanced & Expert Users Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| C function to test existence of a login | xavier054 | High Level Programming | 2 | 03-04-2008 01:51 PM |
| Csh to check for existence of file | Raynon | Shell Programming and Scripting | 9 | 12-05-2007 09:20 PM |
| How to check the file existence using shell scripting in Solaris-10 | krevathi1912 | SUN Solaris | 2 | 11-26-2007 05:07 AM |
| Variable check for existence ? | samit_9999 | UNIX for Dummies Questions & Answers | 2 | 12-05-2006 05:15 PM |
| check for FILES existence | mpang_ | Shell Programming and Scripting | 3 | 06-28-2006 06:51 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Check existence of a login
Hi everybody,
I need to check in C program wether 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 suprised 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 |
| Bookmarks |
| Tags |
| linux, linux commands, linux mandrake, solaris |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|