Let $k$ be a field, $\mathfrak{g}$ be a lie algebra over $k$ and $\mathcal{A} = \mathcal{U}(\mathfrak{g})$ be the universal enveloping algebra of $\mathfrak{g}$. When dealing with the homology of $\mathfrak{g}$ we see $k$ as a trivial $\mathcal{A}$-module (see Lie algebra homology and Chevalley-Eilenberg chain complex). Is the action simply $w \cdot \lambda = 0$ for all $w \in \mathcal{A}, \lambda \in k$? Since the ring $\mathcal{A}$ is unital that doesn't seem to be the case, otherwise $k$ would be trivial: $1 = 1 \cdot 1 = 0$.
2 Answers
Recall that $\mathcal{A}$ is generated (as a $k$-algebra) by the elements of $\mathfrak{g}$. An $\mathcal{A}$-module structure on $k$ is equivalent data to a ring homomorphism $\mathcal{A} \to \operatorname{End}_{\mathbb{Z}}(k)$. The "trivial action" is actually a $k$-algebra homomorphism $\mathcal{A} \to \operatorname{End}_k(k)$ (note that $\operatorname{End}_k(k) \subseteq \operatorname{End}_{\mathbb{Z}}(k)$), determined by sending each element of $\mathfrak{g}$ to $0$ (it's important to check that this is well-defined, i.e. $[g_1, g_2] - g_1 g_2 + g_2 g_1 \mapsto 0$ for all $g_1, g_2 \in \mathfrak{g}$). Since this is a $k$-algebra homomorphism, we have (for example) $1 \cdot 1 = \operatorname{id}_k(1) = 1$, giving us no problems.
Side note: there is no such thing as a field where $1 = 0$! Indeed part of the definition of a field is that $1 \neq 0$.
The other answer is correct, but I'd like to add the following view: $\mathcal U(\mathfrak g)$ has a natural filtration $\mathcal U(\mathfrak g)_0 \subsetneq \mathcal U(\mathfrak g)_1 \subsetneq \mathcal U(\mathfrak g)_2 \subsetneq ...$ (inherited from the tensor algebra), where the zero-th step is just the ground field $k$.
Now it's clear from the filtration properties that $\mathcal U(\mathfrak g)_0$ is a subalgebra, but more importantly for us, it's also a quotient. Namely, the set $I:= \{0\} \cup \{u\in \mathcal U(\mathfrak g): u \notin \mathcal U(\mathfrak g)_0 \}$ is an ideal in $\mathcal U(\mathfrak g)$. This ideal is the image in $\mathcal U(\mathfrak g)$ of the ideal $$\hat I := \color{red}{0}\oplus \mathfrak g \oplus (\mathfrak g \otimes \mathfrak g) \oplus (\mathfrak g \otimes \mathfrak g \otimes \mathfrak g) \oplus ...$$ in the tensor algebra $$T(\mathfrak g) := \color{blue}{k}\oplus \mathfrak g \oplus (\mathfrak g \otimes \mathfrak g) \oplus (\mathfrak g \otimes \mathfrak g \otimes \mathfrak g) \oplus ...$$ We get a projection $U(\mathfrak g) \twoheadrightarrow U(\mathfrak g)/I \simeq U(\mathfrak g)_0 \simeq k$ with trivial $\mathfrak g$-action.
As an instructive example, consider an abelian Lie algebra $\mathfrak g$ with $k$-basis $x_1, .., x_d$. Then $U(\mathfrak g) \simeq k[x_1, ..., x_d]$, the polynomial ring in $d$ variables. The above projection is just the map sending such a polynomial to its constant term,
$$ \sum c_{\alpha_1, ..., \alpha_d} \,x_1^{\alpha_1} \cdots x_d^{\alpha_d} \;\mapsto \; c_{(0,...,0)}$$ If we let $U(\mathfrak g)$ act on $k$ via this projection, indeed $x_i \cdot \lambda=0$ for all $x_i \in \mathfrak g, \lambda \in k$, but still $1 \cdot \lambda = \lambda$. (Note in general $1 \in U(\mathfrak g)_0$ but $\mathfrak g \setminus \{0\} =U(\mathfrak g)_1\setminus U(\mathfrak g)_0$. The unit $1$ is not in the Lie algebra, it's in a different filtration step.)