Sophie

Sophie

distrib > Mageia > 4 > i586 > by-pkgid > b38d2da330d1936e5ab1307c039c4941 > files > 400

octave-doc-3.6.4-3.mga4.noarch.rpm

<html lang="en">
<head>
<title>Password Database Functions - GNU Octave</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="GNU Octave">
<meta name="generator" content="makeinfo 4.13">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="System-Utilities.html#System-Utilities" title="System Utilities">
<link rel="prev" href="Current-Working-Directory.html#Current-Working-Directory" title="Current Working Directory">
<link rel="next" href="Group-Database-Functions.html#Group-Database-Functions" title="Group Database Functions">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
  pre.display { font-family:inherit }
  pre.format  { font-family:inherit }
  pre.smalldisplay { font-family:inherit; font-size:smaller }
  pre.smallformat  { font-family:inherit; font-size:smaller }
  pre.smallexample { font-size:smaller }
  pre.smalllisp    { font-size:smaller }
  span.sc    { font-variant:small-caps }
  span.roman { font-family:serif; font-weight:normal; } 
  span.sansserif { font-family:sans-serif; font-weight:normal; } 
--></style>
</head>
<body>
<div class="node">
<a name="Password-Database-Functions"></a>
<p>
Next:&nbsp;<a rel="next" accesskey="n" href="Group-Database-Functions.html#Group-Database-Functions">Group Database Functions</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="Current-Working-Directory.html#Current-Working-Directory">Current Working Directory</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="System-Utilities.html#System-Utilities">System Utilities</a>
<hr>
</div>

<h3 class="section">36.9 Password Database Functions</h3>

<p>Octave's password database functions return information in a structure
with the following fields.

     <dl>
<dt><code>name</code><dd>The user name.

     <br><dt><code>passwd</code><dd>The encrypted password, if available.

     <br><dt><code>uid</code><dd>The numeric user id.

     <br><dt><code>gid</code><dd>The numeric group id.

     <br><dt><code>gecos</code><dd>The GECOS field.

     <br><dt><code>dir</code><dd>The home directory.

     <br><dt><code>shell</code><dd>The initial shell. 
</dl>

   <p>In the descriptions of the following functions, this data structure is
referred to as a <var>pw_struct</var>.

<!-- getpwent src/DLD-FUNCTIONS/getpwent.cc -->
   <p><a name="doc_002dgetpwent"></a>

<div class="defun">
&mdash; Loadable Function: <var>pw_struct</var> = <b>getpwent</b> ()<var><a name="index-getpwent-3313"></a></var><br>
<blockquote><p>Return a structure containing an entry from the password database,
opening it if necessary.  Once the end of the data has been reached,
<code>getpwent</code> returns 0. 
</p></blockquote></div>

<!-- getpwuid src/DLD-FUNCTIONS/getpwent.cc -->
   <p><a name="doc_002dgetpwuid"></a>

<div class="defun">
&mdash; Loadable Function: <var>pw_struct</var> = <b>getpwuid</b> (<var>uid</var>)<var>.<a name="index-getpwuid-3314"></a></var><br>
<blockquote><p>Return a structure containing the first entry from the password database
with the user ID <var>uid</var>.  If the user ID does not exist in the
database, <code>getpwuid</code> returns 0. 
</p></blockquote></div>

<!-- getpwnam src/DLD-FUNCTIONS/getpwent.cc -->
   <p><a name="doc_002dgetpwnam"></a>

<div class="defun">
&mdash; Loadable Function: <var>pw_struct</var> = <b>getpwnam</b> (<var>name</var>)<var><a name="index-getpwnam-3315"></a></var><br>
<blockquote><p>Return a structure containing the first entry from the password database
with the user name <var>name</var>.  If the user name does not exist in the
database, <code>getpwname</code> returns 0. 
</p></blockquote></div>

<!-- setpwent src/DLD-FUNCTIONS/getpwent.cc -->
   <p><a name="doc_002dsetpwent"></a>

<div class="defun">
&mdash; Loadable Function:  <b>setpwent</b> ()<var><a name="index-setpwent-3316"></a></var><br>
<blockquote><p>Return the internal pointer to the beginning of the password database. 
</p></blockquote></div>

<!-- endpwent src/DLD-FUNCTIONS/getpwent.cc -->
   <p><a name="doc_002dendpwent"></a>

<div class="defun">
&mdash; Loadable Function:  <b>endpwent</b> ()<var><a name="index-endpwent-3317"></a></var><br>
<blockquote><p>Close the password database. 
</p></blockquote></div>

   </body></html>