[Pkg-shadow-devel] Bug#293492: useradd: by default creates user with unspecified shell, this causes problems

Tomasz Kłoczko kloczek@zie.pg.gda.pl
Thu, 12 May 2005 12:56:33 +0200 (CEST)


  This message is in MIME format.  The first part should be readable text,
  while the remaining parts are likely unreadable without MIME-aware tools.

--568760595-430552176-1115895393=:3971
Content-Type: TEXT/PLAIN; charset=ISO-8859-2
Content-Transfer-Encoding: QUOTED-PRINTABLE

On Thu, 12 May 2005, Martin Quinson wrote:
[..]
> And, as a conclusion, I'd like to note that if you agree with me, the fix
> follows:
> 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=092005-05-12 11:05:27.577364326 +0200
> +++ shadow-4.0.3/src/useradd.c=092005-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/bash";
>  static const char *def_template =3D SKEL_DIR;
> =20
>  #ifdef SHADOWPWD
> =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
>=20
> Should we discuss any further for such a simple thing?

In Solaris if user do not have specified in passwd shell program this mean=
=20
user uses /bin/sh. Probably it will be good prepare for this shadow, PAM=20
and other things. For example on Solaris is very usefull if shell for root=
=20
account will be entered ith some typos. In this case on login is showed=20
error message about this and as fall back shell is runed /bin/sh. /bin/sh=
=20
is also runed as fall back shell if shell specified in passwd wil finish=20
work with SIGSEV. This kind behavior few times save my ass^H^H^H^H^H^Hmany=
=20
time on system recovery.

And second: in system *must be* installed /bin/sh but /bin/bash is allways=
=20
optional.
Summarize: above patch can't be commited in shadow CVS source tree.

kloczek
--=20
-----------------------------------------------------------
*Ludzie nie maj=B1 problem=F3w, tylko sobie sami je stwarzaj=B1*
-----------------------------------------------------------
Tomasz K=B3oczko, sys adm @zie.pg.gda.pl|*e-mail: kloczek@rudy.mif.pg.gda.p=
l*
--568760595-430552176-1115895393=:3971--