Method: Bandshell::Passwords.restore_shadow

Defined in:
lib/bandshell/passwords.rb

.restore_shadowObject



41
42
43
44
45
# File 'lib/bandshell/passwords.rb', line 41

def self.restore_shadow
  oldshadow = IO.read("/etc/shadow")
  shadow_content = Bandshell::ConfigStore.read_config('shadow_file', oldshadow)
  IO.write("/etc/shadow", shadow_content)
end