Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/linux/26.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C 自动解析外部passwd和shadow文件?_C_Linux_Linux Kernel_Passwords - Fatal编程技术网

C 自动解析外部passwd和shadow文件?

C 自动解析外部passwd和shadow文件?,c,linux,linux-kernel,passwords,C,Linux,Linux Kernel,Passwords,我想用C解析另一台计算机上的passwd和shadow文件的副本。我知道我可以使用以下方法解析本地计算机上的passwd和shadow文件: struct passwd *getpwent(void); struct spwd *getspent(void); 但是这不需要一个文件作为输入参数,所以我想知道是否有一个等价的函数将passwd和shadow文件作为输入参数 工作原理完全相同,但以文件*作为参数。您要查找的 工作原理完全相同,但以文件*作为参数

我想用C解析另一台计算机上的passwd和shadow文件的副本。我知道我可以使用以下方法解析本地计算机上的passwd和shadow文件:

struct passwd *getpwent(void);
struct spwd *getspent(void);
但是这不需要一个文件作为输入参数,所以我想知道是否有一个等价的函数将passwd和shadow文件作为输入参数

工作原理完全相同,但以文件*作为参数。

您要查找的

工作原理完全相同,但以文件*作为参数