Search Results

Search: Posts Made By: xavier054
8,451
Posted By xavier054
Apologies :o I had a look at pam(8) manpage...
Apologies :o

I had a look at pam(8) manpage in the meantime... It sounds complicated, at least in portability point of view. More precisely, I don't mean than PAM is not portable. But it may be...
14,319
Posted By xavier054
The function reads from stdin. Assuming you saved...
The function reads from stdin. Assuming you saved my code in a /tmp/script file, and that you wish to read a file nammed foo.txt you need to source /tmp/script, and then pipe foo.txt to the...
Forum: Programming 03-04-2008
3,947
Posted By xavier054
Hi, the discussion has moved here, indeed: ...
Hi, the discussion has moved here, indeed:

https://www.unix.com/unix-advanced-expert-users/55335-check-existence-login.html?highlight=existence+login

X.
14,319
Posted By xavier054
Is there any separator between 2 blocks? Or do...
Is there any separator between 2 blocks? Or do you have something special to identify the beginning of a block? If I knew it began by "Block", say, I would write in sh something like

function...
8,451
Posted By xavier054
Originally, it seems it did search /etc/passwd,...
Originally, it seems it did search /etc/passwd, at least on Linux:
GETPWNAM (http://www.linuxmanpages.com/man3/getpwnam.3.php)

On the Mandrake 2006.0 I am (unfortunately) compelled to use at...
8,451
Posted By xavier054
Originally, Linux manpage said it: GETPWNAM...
Originally, Linux manpage said it:

GETPWNAM (http://www.linuxmanpages.com/man3/getpwnam.3.php)

On a Mandrake 2006.0, the beginning of the manpage I have is exactly the same. A bit confusing...
8,451
Posted By xavier054
Thanks, this answers my question. Furthermore I...
Thanks, this answers my question. Furthermore I was wrong, and you are right: the shell knows only for users already logged at least once on the system. I could test getpwnam() on a set of PCs...
8,451
Posted By xavier054
Thanks for your answer. That is true for the...
Thanks for your answer.
That is true for the current user, who is obviously logged in. However, if I have an existing user, say bob with HOME=/home/bob, on a system, then anyone will see ~bob...
Forum: Programming 03-01-2008
3,947
Posted By xavier054
C function to test existence of a login
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...
2,578
Posted By xavier054
Another solution
To execute a simple script (that would execute ls -l / for example), my ideao would be to use the standard input :

echo "ls -l /" | ssh host "cat > /tmp/tmpscript && chmod +x /tmp/tmpscript &&...
8,451
Posted By xavier054
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...
Showing results 1 to 11 of 11

 
All times are GMT -4. The time now is 10:55 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy