su command failing on RHEL5
Hi, su command is failing with below error on RHEL5. We are using coreutils-5.97-14.el5 [r...@omvm6 ~]# su --version su (GNU coreutils) 5.97 [r...@omvm6 ~]# su poo -c cat /dev/tty cat: /dev/tty: No such device or address strace is showing below: . . fstat(3, {st_mode=S_IFREG|0644, st_size=56426016, ...}) = 0 mmap(NULL, 56426016, PROT_READ, MAP_PRIVATE, 3, 0) = 0x2b37c6dff000 close(3)= 0 fstat(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 1), ...}) = 0 open(/dev/tty, O_RDONLY) = -1 ENXIO (No such device or address) write(2, cat: , 5cat: )= 5 write(2, /dev/tty, 8/dev/tty) = 8 open(/usr/share/locale/locale.alias, O_RDONLY) = 3 fstat(3, {st_mode=S_IFREG|0644, st_size=2528, ...}) = 0 . . . The above command is working on RHEL4 with coreutils-5.2.1-31.7 Please let us know the fix available or not. Thanks Regards, Sanjay Kumar Sr. Software Engg Symantec Corporation www.symantec.com http://www.symantec.com/ Office: (020) 4075 4020 Mobile: 919881061153 sanjay_kum...@symantec.com image001.gifimage002.gif___ Bug-coreutils mailing list Bug-coreutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-coreutils
RE: su command failing on RHEL5
That I have already checked. [r...@omvm6 ~]# ls -ld /dev/tty crw-rw-rw- 1 root tty 5, 0 Jun 13 00:32 /dev/tty [r...@omvm6 ~]# I have written, that after copying su executable from RHEL4 on RHEL5, it is working. There must be some issue with coreutils-5.97. Thanks Regards, Sanjay Kumar Sr. Software Engg Symantec Corporation www.symantec.com Office: (020) 4075 4020 Mobile: 919881061153 sanjay_kum...@symantec.com -Original Message- From: Bob Proulx [mailto:b...@proulx.com] Sent: Friday, June 12, 2009 5:43 PM To: Sanjay Kumar Cc: bug-coreutils@gnu.org Subject: Re: su command failing on RHEL5 Sanjay Kumar wrote: [r...@omvm6 ~]# su poo -c cat /dev/tty cat: /dev/tty: No such device or address ... strace is showing below: open(/dev/tty, O_RDONLY) = -1 ENXIO (No such device or address) The su command appears to be working properly. The problem shown above is that your system is missing the /dev/tty device node. Something has apparently removed it! You can confirm this by running the following. ls -ld /dev/tty You could repair your system by creating that device node. See the 'mknod' documentation for how. Bob ___ Bug-coreutils mailing list Bug-coreutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-coreutils