Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 57231 - sg (set group) of the shadow package fails on password requirement
Summary: sg (set group) of the shadow package fails on password requirement
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: x86 Linux
: High major (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-07-15 14:38 UTC by Joseph M. Hinkle
Modified: 2004-07-15 19:47 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Joseph M. Hinkle 2004-07-15 14:38:29 UTC
sg (set group) before v4.0.4.1, in accordance with the specification, permitted a user named in /etc/group to set the account group without a password if no password was entered:
For example:
  tty::5:sysop
should permit sysop to "sg tty" without a password.  Since sometime before shadow v4.0.4.1 sg has required a password in any case.
If a valid MD5 of a password is entered, the password check fails.
In other words, sg is useless.

Reproducible: Always
Steps to Reproduce:
1. Add a user to a group in /etc/group
2. Login as that user
3. Attempt to sg to that group
Actual Results:  
In all cases, the response is "Password:" and entry of none (carriage return) if
no password is in the /etc/group entry, or a valid password if there is a valid
password entry (MD5) the response is "Sorry"

Expected Results:  
It should have set the group to that specified in the command

Gentoo Base System version 1.4.16
Portage 2.0.50-r8 (default-x86-2004.0, gcc-3.3.3, glibc-2.3.3.20040420-r0,
2.6.5-gentoo-r1)
=================================================================
System uname: 2.6.5-gentoo-r1 i586 Pentium MMX
distcc 2.13 i386-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
ccache version 2.3 [enabled]
Autoconf: sys-devel/autoconf-2.59-r3
Automake: sys-devel/automake-1.8.3
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-O2 -mcpu=pentium-mmx -fomit-frame-pointer -pipe"
CHOST="i386-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config
/usr/kde/3.2/share/config /usr/kde/3/share/config /usr/lib/mozilla/defaults/pref
/usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -mcpu=pentium-mmx -fomit-frame-pointer -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache sandbox"
GENTOO_MIRRORS="http://gentoo.oregonstate.edu
http://distro.ibiblio.org/pub/Linux/distributions/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X alsa apm arts avi berkdb cjk crypt cups doc encode esd f77 foomaticdb gcj
gdbm gif gnome gpm gtk gtk2 imlib java jpeg kde libg++ libwww mad mikmod motif
mozilla mpeg ncurses oggvorbis opengl oss pam pdflib perl png postgres python qt
quicktime readline sdl slang ssl svga tcltk tcpd truetype x86 xml2 xmms xv zlib"
Comment 1 Joseph M. Hinkle 2004-07-15 19:47:49 UTC
Remove this as a bug.
Users named as group members must be named in /etc/gshadow, not /etc/group