diff --git a/slapos/recipe/random.py b/slapos/recipe/random.py
index bcfba3ed763d104db2e011f7c5772dfbc637e413..51c623b2c65096abdddcdabbc1fd4ef7566938cf 100644
--- a/slapos/recipe/random.py
+++ b/slapos/recipe/random.py
@@ -134,14 +134,14 @@ class Password(object):
     if self.storage_path:
       try:
         with open(self.storage_path) as f:
-          passwd = f.read()
+          passwd = f.read().strip('\n')
       except IOError as e:
         if e.errno != errno.ENOENT:
           raise
     if not passwd:
       passwd = self.generatePassword(int(options.get('bytes', '8')))
       self.update = self.install
-    self.passwd = passwd.strip('\n')
+    self.passwd = passwd
     # Password must not go into .installed file, for 2 reasons:
     # security of course but also to prevent buildout to always reinstall.
     def get(option, *args, **kw):