pwd.h.html

来自「unix 下的C开发手册,还用详细的例程。」· HTML 代码 · 共 79 行

HTML
79
字号
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"><html><head><!-- Copyright 1997 The Open Group, All Rights Reserved --><title>&lt;pwd.h&gt;</title></head><body bgcolor=white><center><font size=2>The Single UNIX &reg; Specification, Version 2<br>Copyright &copy; 1997 The Open Group</font></center><hr size=2 noshade><h4><a name = "tag_000_007_1834">&nbsp;</a>NAME</h4><blockquote>pwd.h - password structure</blockquote><h4><a name = "tag_000_007_1835">&nbsp;</a>SYNOPSIS</h4><blockquote><pre><code>#include &lt;pwd.h&gt;</code></pre></blockquote><h4><a name = "tag_000_007_1836">&nbsp;</a>DESCRIPTION</h4><blockquote>The<i>&lt;pwd.h&gt;</i>header provides a definition for<b>struct passwd</b>,which includes at least the following members:<pre><code>char    *pw_name   user's login nameuid_t    pw_uid    numerical user IDgid_t    pw_gid    numerical group IDchar    *pw_dir    initial working directorychar    *pw_shell  program to use as shell</code></pre><p>The<b>gid_t</b>and<b>uid_t</b>types are defined as described in<i><a href="systypes.h.html">&lt;sys/types.h&gt;</a></i>.<p>The following are declared as functions and may also be definedas macros.Function prototypes must be provided for use with an ISO Ccompiler.<pre><code>struct passwd *<a href="getpwnam.html">getpwnam</a>(const char *);struct passwd *<a href="getpwuid.html">getpwuid</a>(uid_t);int            <a href="getpwnam_r.html">getpwnam_r</a>(const char *, struct passwd *, char *,                   size_t, struct passwd **);int            <a href="getpwuid_r.html">getpwuid_r</a>(uid_t, struct passwd *, char *,                   size_t, struct passwd **);void           <a href="endpwent.html">endpwent</a>(void);struct passwd *<a href="getpwent.html">getpwent</a>(void);void           <a href="setpwent.html">setpwent</a>(void);</code></pre></blockquote><h4><a name = "tag_000_007_1837">&nbsp;</a>APPLICATION USAGE</h4><blockquote>None.</blockquote><h4><a name = "tag_000_007_1838">&nbsp;</a>FUTURE DIRECTIONS</h4><blockquote>None.</blockquote><h4><a name = "tag_000_007_1839">&nbsp;</a>SEE ALSO</h4><blockquote><i><a href="endpwent.html">endpwent()</a></i>,<i><a href="getpwnam.html">getpwnam()</a></i>,<i><a href="getpwuid.html">getpwuid()</a></i>,<i><a href="getpwuid.html">getpwuid_r()</a></i>,<i><a href="systypes.h.html">&lt;sys/types.h&gt;</a></i>.</blockquote><hr size=2 noshade><center><font size=2>UNIX &reg; is a registered Trademark of The Open Group.<br>Copyright &copy; 1997 The Open Group<br> [ <a href="../index.html">Main Index</a> | <a href="../xshix.html">XSH</a> | <a href="../xcuix.html">XCU</a> | <a href="../xbdix.html">XBD</a> | <a href="../cursesix.html">XCURSES</a> | <a href="../xnsix.html">XNS</a> ]</font></center><hr size=2 noshade></body></html>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?