resolve issues with missing user in containers
This change resolves an issue in container where the user id is not found. This will create a passwd file with a single line that is for the container user using the uid and gid of the pterodactyl user. As an added security benefit this would also stop users being able to just use `/bin/bash` as it sets the users terminal to nologin by default and is configurable example passwd file contents `container:x:999:999::/home/container:/usr/sbin/nologin`
This commit is contained in:
@@ -27,6 +27,12 @@ func (s *Server) Mounts() []environment.Mount {
|
||||
Source: s.Filesystem().Path(),
|
||||
ReadOnly: false,
|
||||
},
|
||||
{
|
||||
Default: true,
|
||||
Target: "/etc/passwd",
|
||||
Source: "/etc/pterodactyl/passwd",
|
||||
ReadOnly: true,
|
||||
},
|
||||
}
|
||||
|
||||
// Also include any of this server's custom mounts when returning them.
|
||||
|
||||
Reference in New Issue
Block a user