Terminal handling broken?

Frank Meerkoetter frank at meerkoetter.org
Tue May 9 07:37:20 GMT 2006


Hi,

i'm running Samba on a small arm-based system. My problem is
that the terminal handling seems to be broken for the samba utilities.

# /mnt/data/smbpasswd -a media
New SMB password:Retype new SMB password:Added user media.

Smbpasswd doesn't prompt me for a password.
An strace looks like this:

open("/dev/urandom", O_RDONLY)          = 7
read(7, "\340", 1)                      = 1
fcntl(6, F_SETLKW, {type=F_RDLCK, whence=SEEK_SET, start=228, len=1}) = 0
fcntl(6, F_SETLKW, {type=F_UNLCK, whence=SEEK_SET, start=228, len=1}) = 0
open("/dev/tty", O_RDWR)                = 18
ioctl(18, SNDCTL_TMR_TIMEBASE or TCGETS, {B115200 opost isig -icanon -echo ...})
= 0
brk(0x161000)                           = 0x161000
ioctl(18, SNDCTL_TMR_TIMEBASE or TCGETS, {B115200 opost isig -icanon -echo ...})
= 0
ioctl(18, SNDCTL_TMR_CONTINUE or TCSETSF, {B115200 opost -isig -icanon -echo
...}) = 0
write(18, "New SMB password:", 17New SMB password:)      = 17
read(18, "", 1)                         = 0
ioctl(18, SNDCTL_TMR_CONTINUE or TCSETSF, {B115200 opost isig -icanon -echo
...}) = 0
close(18)                               = 0
open("/dev/tty", O_RDWR)                = 18
ioctl(18, SNDCTL_TMR_TIMEBASE or TCGETS, {B115200 opost isig -icanon -echo ...})
= 0
ioctl(18, SNDCTL_TMR_TIMEBASE or TCGETS, {B115200 opost isig -icanon -echo ...})
= 0
ioctl(18, SNDCTL_TMR_CONTINUE or TCSETSF, {B115200 opost -isig -icanon -echo
...}) = 0
write(18, "Retype new SMB password:", 24Retype new SMB password:) = 24
read(18, "", 1)                         = 0
ioctl(18, SNDCTL_TMR_CONTINUE or TCSETSF, {B115200 opost isig -icanon -echo
...}) = 0
close(18)

The smbclient also doesn't work (i wasn't prompted for a password either):

# /mnt/data/smbclient \\\\192.168.1.1\\share
Password: Anonymous login successful
Domain=[BLABLA] OS=[Unix] Server=[Samba 2.2.8a-SuSE]
tree connect failed: NT_STATUS_WRONG_PASSWORD

My configure line looks like this:

	samba_cv_USE_SETRESUID=yes \
	samba_cv_USE_SETRESGID=yes \
	samba_cv_HAVE_IFACE_IFCONF=yes \
	samba_cv_have_longlong=yes \
	samba_cv_HAVE_UNSIGNED_CHAR=yes \
	samba_cv_HAVE_MMAP=yes \
	samba_cv_HAVE_MAKEDEV=yes \
	samba_cv_HAVE_KERNEL_SHARE_MODES=yes \
	samba_cv_HAVE_BROKEN_GETGROUPS=no \
	samba_cv_HAVE_BROKEN_READDIR=no \
	samba_cv_SYSCONF_SC_NGROUPS_MAX=yes \
	samba_cv_SYSCONF_SC_NPROC_ONLN=no \
	samba_cv_HAVE_GETTIMEOFDAY_TZ=yes \
	samba_cv_HAVE_FTRUNCATE_EXTEND=yes \
	samba_cv_HAVE_C99_VSNPRINTF=yes \
	samba_cv_REALPATH_TAKES_NULL=no \
	samba_cv_HAVE_w2=no \
	samba_cv_HAVE_Werror=yes \
	samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=no \
	samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=yes \
	samba_cv_REPLACE_INET_NTOA=no \
	samba_cv_HAVE_WORKING_AF_LOCAL=yes \
	samba_cv_HAVE_DEVICE_MAJOR_FN=yes \
	samba_cv_HAVE_DEVICE_MINOR_FN=yes \
	samba_cv_HAVE_SECURE_MKSTEMP=yes \
	fu_cv_sys_stat_statvfs64=no \
	samba_cv_HAVE_FCNTL_LOCK=yes \
	samba_cv_HAVE_DEV64_T=no \
	samba_cv_HAVE_BROKEN_FCNTL64_LOCKS= \
	samba_cv_HAVE_INO64_T=no \
	samba_cv_HAVE_OFF64_T=no \
	samba_cv_HAVE_STRUCT_FLOCK64=no \
	samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=yes \
	samba_cv_HAVE_TRUNCATED_SALT=no \
	samba_cv_SIZEOF_OFF_T=no \
	samba_cv_SIZEOF_DEV_T=no \
	samba_cv_SIZEOF_INO_T=no \
	./configure \
	--target=$(GNU_TARGET_NAME) \
	--host=$(GNU_TARGET_NAME) \
	--build=$(GNU_HOST_NAME) \
	--sysconfdir=/var/etc/ \
	--localstatedir=/var \
	--prefix=/usr \
	--without-sendfile-support \
	--disable-pie \
	--with-fhs \
	--without-ldap \
	--without-sys-quotas \
	--without-libmsrpc \
	--without-libsmbsharemodes \
	--disable-cups \
	--disable-iprint \
	--disable-xmltest \
	--without-readline \
	--without-ads )

The relevant(?) parts of my config.h look like this:

grep -i term config.h
/* Define to 1 if you have the <sys/termio.h> header file. */
/* #undef HAVE_SYS_TERMIO_H */
/* Define to 1 if you have the <termios.h> header file. */
#define HAVE_TERMIOS_H 1
/* Define to 1 if you have the <termio.h> header file. */
#define HAVE_TERMIO_H 1

grep -i getpass config.h
/* Whether getpass should be replaced */
#define REPLACE_GETPASS 1

Any ideas how i can fix this?

TIA,
   Frank



More information about the samba-technical mailing list