From 2172ba82ffac7ab0de49f8c39f34b1bff39c025e Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 30 Mar 2014 19:22:10 -0400 Subject: propellor spin --- Propellor.hs | 2 ++ Property/User.hs | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Propellor.hs b/Propellor.hs index 01671786..d78b61c3 100644 --- a/Propellor.hs +++ b/Propellor.hs @@ -19,6 +19,8 @@ getProperties :: HostName -> [Property] getProperties hostname@"clam.kitenet.net" = [ cleanCloudAtCost hostname , standardSystem Apt.Unstable + , hasPassword "root" + , hasPassword "joey" -- Clam is a tor bridge. , Tor.isBridge , Apt.installed ["docker.io"] diff --git a/Property/User.hs b/Property/User.hs index dcbf56c9..661a6f8a 100644 --- a/Property/User.hs +++ b/Property/User.hs @@ -22,8 +22,8 @@ nuked user _ = check (isJust <$> homedir user) $ cmdProperty "userdel" ] `describe` ("nuked user " ++ user) -setPassword :: UserName -> Property -setPassword user = Property (user ++ " password set") $ +hasPassword :: UserName -> Property +hasPassword user = Property (user ++ " has password") $ withPrivData (Password user) $ \password -> makeChange $ withHandle StdinHandle createProcessSuccess (proc "chpasswd" []) $ \h -> do -- cgit v1.2.3