Guest User

Untitled

a guest
Apr 27th, 2018
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. dslist = %x(#{DSCL} . -list /Users).split("\n")
  2.  
  3. dslist.reject! { |user| user[0].chr == "_" }
  4.  
  5. dslist.each do |user|
  6. user_plist = File.expand_path(tmp_path + "/dslocal/" + user + ".xml")
  7.  
  8. puts "Executing #{DSCL} -plist . -read /Users/#{user}" if @options.verbose
  9.  
  10. plist = %x(#{DSCL} -plist . -read /Users/#{user})
  11.  
  12. # user_plist.puts plist
  13. File.open(user_plist, 'w') {|f| f.write( plist ) }
  14.  
  15. end
Add Comment
Please, Sign In to add comment