Bug#293492: [Pkg-shadow-devel] Bug#293492: useradd: by default creates user with unspecified shell, this causes problems
Martin Quinson
Martin Quinson <martin.quinson@loria.fr>, 293492@bugs.debian.org
Thu, 12 May 2005 20:43:34 +0200
--TD8GDToEDw0WLGOL
Content-Type: multipart/mixed; boundary="k4f25fnPtRuIRUb3"
Content-Disposition: inline
--k4f25fnPtRuIRUb3
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
Hello,=20
here is a patch to solve this issue. Its documentation is included in the
header. Alex, this bug is "yours". I leave to you the decision about it
actual inclusion or rework.
Bye, Mt.
--k4f25fnPtRuIRUb3
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=up_useradd_no_empty_shell_293492
Content-Transfer-Encoding: quoted-printable
Goal: make sure that we have a decent default SHELL setting in adduser
Fixes: #48304, which reincarned into #293492
Status wrt upstream:
Tomasz would prefer to have a decent fall back rather than default setting
(thinking about wrongly typed shell for root). This is how it works under
solaris. But he's ok with this patch, as temporary fix.
Index: shadow-4.0.3/src/useradd.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- shadow-4.0.3.orig/src/useradd.c 2005-05-12 11:05:27.577364326 +0200
+++ shadow-4.0.3/src/useradd.c 2005-05-12 11:07:39.748616230 +0200
@@ -76,7 +76,7 @@ RCSID (PKG_VER "$Id: useradd.c,v 1.32 20
static gid_t def_group =3D 100;
static const char *def_gname =3D "other";
static const char *def_home =3D "/home";
-static const char *def_shell =3D "";
+static const char *def_shell =3D "/bin/sh";
static const char *def_template =3D SKEL_DIR;
=20
#ifdef SHADOWPWD
--k4f25fnPtRuIRUb3--
--TD8GDToEDw0WLGOL
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature
Content-Disposition: inline
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)
iD8DBQFCg6PVIiC/MeFF8zQRAiUaAKCOjqOiCpDYT/dn0AuZVPwgYq+nXgCglgc3
d5+GXcuGoWJVg1MeNqsVZc0=
=UM8t
-----END PGP SIGNATURE-----
--TD8GDToEDw0WLGOL--