Skip to content

Commit 83a6e82

Browse files
h00diejvoisin
andauthored
Update lib/msf/core/post/linux/user.rb
Co-authored-by: Julien Voisin <[email protected]>
1 parent f9a804d commit 83a6e82

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/msf/core/post/linux/user.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ module User
88
# Returns a string of the user's home directory
99
#
1010
def get_home_dir(user)
11-
cmd_exec("/bin/cat /etc/passwd | grep '^#{user}:' | cut -d ':' -f 6").chomp
11+
cmd_exec("grep '^#{user}:' /etc/passwd | cut -d ':' -f 6").chomp
1212
# could also be: "getent passwd #{user} | cut -d: -f6"
1313
end
1414
# User

0 commit comments

Comments
 (0)