Files in /sbin

General support questions
Post Reply
MartinR
Posts: 714
Joined: 2015/05/11 07:53:27
Location: UK

Files in /sbin

Post by MartinR » 2017/08/23 14:21:44

Hi. I've been poking around one of my systems and have discovered a lot of files in /sbin that don't seem to be owned by any yum package. Unlike my other machines, this one was set up and brought on line in my absence, so I don't know exactly what was done. It's been running for a few years now and is in production so I need to tread carefully.
  • ads-connect, -start, -stop -setup and -status. setup start and stop seem to be duplicated in /usr/sbin, and we will never need to connect over a phone line.
  • bsd_ping and s20tune. These two seem to be needed by iba_config, see next.
  • iba_XXX. 19 such files, plus the two above, plus fabric_info, clear_p1stats, p1info and p1stats. I assume these are an infiniband test suite. They are undocumented, is there a documented version?
  • Various e4fs utilities: dump, debug, fsck, image, label, undo.
  • diva*, kudzu*. Any comments?
  • mpath_prio*, mpath_ctl, mpath_wait, multipath.static. Again, should these be here?
  • various udev files.
There are a few more as well. Those that have no use and are never used are not a problem, but since /sbin comes earlier in the path than /usr/sbin I have picked up that, for example, lsusb is using a C5 display format on a C6 machine, which is why I went looking for trouble. I have system time booked this weekend, so that would be a good time to remove any accumulated crud.

Thanks,
Martin

User avatar
TrevorH
Site Admin
Posts: 33219
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Files in /sbin

Post by TrevorH » 2017/08/23 15:59:43

Kudzu was the el5 "I've found new hardware" boot time detector. I suspect someone has copied more than they ought to from an el5 machine...
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

MartinR
Posts: 714
Joined: 2015/05/11 07:53:27
Location: UK

Re: Files in /sbin

Post by MartinR » 2017/08/24 12:26:54

... so do I!

Can you think of any files that should be in /sbin (or for that matter /bin) which are not "owned" by a yum package? I think I'll probably rename them: XXX -> o.XXX, reboot and see what breaks.

User avatar
TrevorH
Site Admin
Posts: 33219
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Files in /sbin

Post by TrevorH » 2017/08/24 13:16:20

Code: Select all

[root@c6test ~]# for f in /sbin/*; do rpm -qf $f; done | grep -v x86_64
dracut-004-409.el6_8.2.noarch
file /sbin/ip6tables is not owned by any package
file /sbin/ip6tables-multi is not owned by any package
file /sbin/ip6tables-restore is not owned by any package
file /sbin/ip6tables-save is not owned by any package
file /sbin/iptables is not owned by any package
file /sbin/iptables-multi is not owned by any package
file /sbin/iptables-restore is not owned by any package
file /sbin/iptables-save is not owned by any package
dracut-004-409.el6_8.2.noarch
dracut-004-409.el6_8.2.noarch
All the not owned packages are symlinks here.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

MartinR
Posts: 714
Joined: 2015/05/11 07:53:27
Location: UK

Re: Files in /sbin

Post by MartinR » 2017/08/24 13:26:50

You had me worried for a moment there! I'd used find with -type f to drive it and hadn't therefore seen those links.

I doubt it makes any difference, but would you expect results to vary between rpm -qf $f and yum provides $f?

User avatar
TrevorH
Site Admin
Posts: 33219
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Files in /sbin

Post by TrevorH » 2017/08/24 15:04:12

Using rpm -qf queries your installed package database. Using yum provides looks at the yum database and tells you if any package, installed or not, contains that file. If you use yum you could be told that a file is owned by a package that isn't installed.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

Post Reply