Method: Pawnee::Actions::User#passwd_data
- Defined in:
- lib/pawnee/pawnee/actions/user.rb
#passwd_data(find_user) ⇒ Object
69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 |
# File 'lib/pawnee/pawnee/actions/user.rb', line 69 def passwd_data(find_user) passwd_data = base.destination_files.binread('/etc/passwd') if passwd_data passwd_data.split(/\n/).each do |line| user, *_, home, shell = line.split(':') if user == find_user return home, shell end end end return nil, nil end |