Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #11554
| From | Christian Heimes <lists@cheimes.de> |
|---|---|
| Subject | Re: Linux : create a user if not exists |
| Date | 2011-08-16 16:14 +0200 |
| References | <CA+zNewSOE1R4NRPQfg8edyDZ=ukwsCQnFkaTT9Ssu+5R5u5y9g@mail.gmail.com> <CAMZYqRRwf8ePhEMAAS2LKWGardXLzfMR7as=2Q1yQ2yK_QBvqQ@mail.gmail.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.62.1313504090.27778.python-list@python.org> (permalink) |
Am 16.08.2011 10:04, schrieb Chris Rebert: > You can replace the /etc/passwd parsing with a call to pwd.getpwnam(): > http://docs.python.org/library/pwd.html#pwd.getpwnam You should replace it. /etc/passwd is not the only source for users. /etc/nsswitch.conf may list more user and group sources like nis/yp, LDAP and so on. Christian
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: Linux : create a user if not exists Christian Heimes <lists@cheimes.de> - 2011-08-16 16:14 +0200
csiph-web