<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-2" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Zdravim,<br>
ano root ma vzdy uid = 0.<br>
Zkuste si do funkce na zjisteni uid pridat jeste toto:<br>
<pre>import pwd
user = pwd.getpwuid(uid)
# user is a tuple
print user[0]</pre>
Hezky den,<br>
David<br>
<br>
Petr Hlávka napsal(a):
<blockquote cite="mide5258fb305091302356802bde3@mail.gmail.com"
type="cite">Zdravim,<br>
<br>
jenom mala poznamka, to uid by melo byt u roota vzdy == 0, ne?<br>
<br>
Petr.<br>
<br>
<div><span class="gmail_quote">On 9/13/05, <b
class="gmail_sendername">MaReK Olšavský</b> <<a
href="mailto:orsm@centrum.cz">orsm@centrum.cz</a>> wrote:</span>
<blockquote class="gmail_quote"
style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Jj,
diky, uz jsem testnul:<br>
<br>
import os<br>
if <a href="http://os.name">os.name</a> == 'posix':<br>
myuid = os.getuid()<br>
print myuid<br>
else:<br>
print <a href="http://os.name">os.name</a><br>
<br>
Tajne prdpokladam, ze root ma vzdy uid == 1000 ufff :-D... Diky
<br>
<br>
</blockquote>
</div>
</blockquote>
<br>
</body>
</html>