1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57
|
+ Library for Unix users and groups in Rust
https://github.com/ogham/rust-users
https://gitlab.com/core-utils/users_native/blob/master/src/lib.rs
* * *
http://www.manpages.info/freebsd/group.5.html
http://www.manpages.info/freebsd/passwd.5.html
FreeBSD: /etc/login.conf
passwd_format
/etc/passwd
/etc/master.passwd
* * *
Command getent:
It retrieves the contents for passwd, shadow, gshadow and a bunch more and
accesses LDAP and others when present.
If the user doesn't have the required privileges, it returns nothing.
It always uses the "right" information source (say you do use LDAP - it'll
report the passwd data from LDAP instead of /etc/passwd).
this really needs to be done via the system libraries to be complete. It looks
to cover the basics fairly well (you didn't even forget about gshadow like most
people), but I wouldn't try to go much further down this path (e.g. don't parse
nsswitch.conf yourself, and try to resolve usernames elsewhere).
Take a look at python-libuser to see what's required for a more complete
interface. https://fedorahosted.org/libuser/
It's a crufty old system, and you really have to go through the standard C
libraries to make sure your library follows the same rules as everything else
that resolves user and group information.
* * *
See command "chage -l [user]"
* * *
Add tests for functions related to changeType in file shadow.go
* * *
http://nerds-central.blogspot.ca/2007/09/how-to-get-sid-for-group-or-user-by.html
http://msdn.microsoft.com/en-us/library/windows/desktop/aa379159%28v=vs.85%29.aspx
http://msdn.microsoft.com/en-us/library/windows/desktop/ms721798%28v=vs.85%29.aspx
http://msdn.microsoft.com/en-us/library/windows/desktop/ms721799%28v=vs.85%29.aspx
|