summaryrefslogtreecommitdiff
path: root/Propellor/Property/User.hs
diff options
context:
space:
mode:
authorJoey Hess2014-04-01 16:58:11 -0400
committerJoey Hess2014-04-01 16:58:11 -0400
commite6d24b49b87de312776bee71a2a6f009f7f397a9 (patch)
treeceba3045f23ee1d3cf36bfe8e8ffa9cb090b9e54 /Propellor/Property/User.hs
parent6a82cdc41c89cc249da4d941a32920ebfd14cb92 (diff)
various improvements
Diffstat (limited to 'Propellor/Property/User.hs')
-rw-r--r--Propellor/Property/User.hs10
1 files changed, 5 insertions, 5 deletions
diff --git a/Propellor/Property/User.hs b/Propellor/Property/User.hs
index 5a23f72d..951a173e 100644
--- a/Propellor/Property/User.hs
+++ b/Propellor/Property/User.hs
@@ -6,15 +6,15 @@ import Propellor
data Eep = YesReallyDeleteHome
-sshAccountFor :: UserName -> Property
-sshAccountFor user = check (isNothing <$> homedir user) $ cmdProperty "adduser"
+accountFor :: UserName -> Property
+accountFor user = check (isNothing <$> homedir user) $ cmdProperty "adduser"
[ "--disabled-password"
, "--gecos", ""
, user
]
`describe` ("ssh account " ++ user)
-{- | Removes user home directory!! Use with caution. -}
+-- | Removes user home directory!! Use with caution.
nuked :: UserName -> Eep -> Property
nuked user _ = check (isJust <$> homedir user) $ cmdProperty "userdel"
[ "-r"
@@ -22,8 +22,8 @@ nuked user _ = check (isJust <$> homedir user) $ cmdProperty "userdel"
]
`describe` ("nuked user " ++ user)
-{- | Only ensures that the user has some password set. It may or may
- - not be the password from the PrivData. -}
+-- | Only ensures that the user has some password set. It may or may
+-- not be the password from the PrivData.
hasSomePassword :: UserName -> Property
hasSomePassword user = check ((/= HasPassword) <$> getPasswordStatus user) $
hasPassword user