On 13/09/2020 14.15, Per Jessen wrote:
Carlos E. R. wrote:
On 13/09/2020 13.55, Per Jessen wrote:
Dave Howorth wrote:
err, you'll need to look in the subdirectories as well, and you'll need to inspect the various dot files like .bashrc
Maybe there's a clever way to do it, but my brain hurts thinking about it.
find <alltopdirs> -type f | xargs grep '/usr/sbin'
Telcontar:/etc/skel # find * -type f | xargs grep '/usr/sbin'
find /etc/skel /etc/dir1 /dir2 /dir3 /whatever -type f | xargs grep '/usr/sbin'
alltopdirs = those dirs where you expect to find scripts or config that might influence PATH
Ok, I use "mc" on /etc to find '/usr/sbin'. There are many irrelevant files. Ah, here: /etc/login.defs: # *REQUIRED* The default PATH settings, for superuser and normal users. # # (they are minimal, add the rest in the shell startup files) # # ENV_PATH: The default PATH settings for non-root. # # ENV_ROOTPATH: The default PATH settings for root # (used by login, su and runuser). # # ENV_SUPATH is an ENV_ROOTPATH override for su and runuser # (and falback for login). # ENV_PATH /usr/local/bin:/bin:/usr/bin ENV_ROOTPATH /usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin #ENV_SUPATH /usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin ... /etc/profile we already saw. Checking: Telcontar:~ # l /etc/login.defs* -rw-r--r-- 1 root root 9108 Oct 29 2019 /etc/login.defs Telcontar:~ # rpm -qf /etc/login.defs shadow-4.6-lp151.2.3.2.x86_64 Telcontar:~ # rpm -qV shadow .......T. c /etc/login.defs Telcontar:~ # S file Size differs M Mode differs (includes permissions and file type) 5 digest (formerly MD5 sum) differs D Device major/minor number mismatch L readLink(2) path mismatch U User ownership differs G Group ownership differs T mTime differs P caPabilities differ So, besides the timestamp differs, but not the checksum, the file is as distributed. -- Cheers / Saludos, Carlos E. R. (from 15.1 x86_64 at Telcontar)