First tilde projects commit

This commit is contained in:
RussellChamp committed 2015-01-02 16:59:08 +00:00
1 parent 9bcadfc4a7
commit 726861fae6
40 files changed
+20890

No files matched your search

+12
View File
@@ -0,0 +1,12 @@
# Return a list of users on this system
def get_users():
# thanks, ~dan!
users = []
with open("/etc/passwd", "r") as f:
for line in f:
if "/bin/bash" in line:
u = line.split(":")[0] # Grab all text before first ':'
users.append(u)
return users