We consider the problem $$\begin{aligned} (P_\lambda )\quad -\Delta _{p}u=\lambda u^{p-1}+a(x)u^{q-1},\quad u\ge 0\quad \text{ in } \Omega \end{aligned}$$under Dirichlet or Neumann boundary conditions. Here \(\Omega \) is a smooth bounded domain of \({\mathbb {R}}^{N}\) (\(N\ge 1\)), \(\lambda \in {\mathbb {R}}\), \(1<q<p\), and \(a\in C({\overline{\Omega }})\) changes sign. These conditions enable the existence of dead core solutions for this problem, which may admit multiple nontrivial solutions. We show that for \(\lambda <0\) the functional $$\begin{aligned} I_{\lambda }(u):=\int _{\Omega }\left( \frac{1}{p}|\nabla u|^{p}-\frac{\lambda }{p}|u|^{p}-\frac{1}{q}a(x)|u|^{q}\right) , \end{aligned}$$defined in \(X=W_{0}^{1,p}(\Omega )\) or \(X=W^{1,p}(\Omega )\), has exactly one nonnegative global minimizer, and this one is the only solution of \((P_{\lambda })\) being positive in \(\Omega _{a}^{+}\) (the set where \(a>0\)). In particular, this problem has at most one positive solution for \(\lambda <0\). Under some condition on a, the above uniqueness result fails for some values of \(\lambda >0\) as we obtain, besides the ground state solution, a second solution positive in \(\Omega _{a}^{+}\). We also provide conditions on \(\lambda \), a and q such that these solutions become positive in \(\Omega \), and analyze the formation of dead cores for a generic solution.