Re: [opensuse] It's all my faults
On 05/14/2018 01:02 PM, Mark Misulich wrote:
I then used dolphin to find every file for rkhunter, and removed
On 05/14/2018 01:35 PM, David C. Rankin wrote: them.
then I tried to install rkhunter-1.4.6 using ./installer.sh -- install. It installs perfectly, but when I try to run it, konsole can't find it.
How do I fix this?
Mark
If konsole can't find it, it is not in your PATH. Your default path with not include /sbin;/usr/sbin so if it gets put there -- there is your answer.
Howerver, root does have /sbin in it's path -- have you tried to su to root and then run it?
It probably does, but I always "rpm -e command-not-found" to get rid of the 3-line mess. Looking at the rkhunter source "install.sh" as well as the opensuse rpm "rkhunter-1.4.2-11.1.x86_64.rpm", both install to /usr/bin (or /usr/local/bin), so there should be no need for any PATH modification. My only other thought is somehow the permissions on the executable got messed up so you no longer have the execute bit set. Please provide an 'ls -al' listing of /usr/bin/rkh* and /usr/lib64/rkhunter/scripts (adjust the paths as required if you installed them to another directory, e.g. /usr/local/...) -- David C. Rankin, J.D.,P.E. Hi, I thought about this overnight and came to the conclusion that upgrading rkhunter from a different directory than the original installation wouldn't have any bearing on whether the program would start from command line. It always started from any point the root system if I typed the command rkhunter. Now it won't. I wondered if the tarball that I downloaded was corrupted, so I removed rkhunter, and cleared the root system of every rkhunter file. Then I downloaded the tarball from sourceforge again, extracted it, and installed it. Here is the result linux-2b8:/home/lx1/Downloads/rkhunter-1.4.6 # ./installer.sh --install Checking system for: Rootkit Hunter installer files: found A web file download command: wget found Starting installation: Checking installation directory "/usr/local": it exists and is writable. Checking installation directories: Directory /usr/local/share/doc/rkhunter-1.4.6: creating: OK Directory /usr/local/share/man/man8: exists and is writable. Directory /etc: exists and is writable. Directory /usr/local/bin: exists and is writable. Directory /usr/local/lib64: exists and is writable. Directory /var/lib: exists and is writable. Directory /usr/local/lib64/rkhunter/scripts: creating: OK Directory /var/lib/rkhunter/db: creating: OK Directory /var/lib/rkhunter/tmp: creating: OK Directory /var/lib/rkhunter/db/i18n: creating: OK Directory /var/lib/rkhunter/db/signatures: creating: OK Installing check_modules.pl: OK Installing filehashsha.pl: OK Installing stat.pl: OK Installing readlink.sh: OK Installing backdoorports.dat: OK Installing mirrors.dat: OK Installing programs_bad.dat: OK Installing suspscan.dat: OK Installing rkhunter.8: OK Installing ACKNOWLEDGMENTS: OK Installing CHANGELOG: OK Installing FAQ: OK Installing LICENSE: OK Installing README: OK Installing language support files: OK Installing ClamAV signatures: OK Installing rkhunter: OK Installing rkhunter.conf: OK Installation complete linux-2b8:/home/lx1/Downloads/rkhunter-1.4.6 # rkhunter --propupd If 'rkhunter' is not a typo you can use command-not-found to lookup the package that contains it, like this: cnf rkhunter Same as before I reworked everything. Here are the results of the list results you requested: linux-2b8:/home/lx1/Downloads/rkhunter-1.4.6 # ls -al /usr/bin/rkh* ls: cannot access '/usr/bin/rkh*': No such file or directory linux-2b8:/home/lx1/Downloads/rkhunter-1.4.6 # ls -al /usr/lib64/rkhunter/scripts ls: cannot access '/usr/lib64/rkhunter/scripts': No such file or directory I didn't modify any of the rkhunter installation scripts to change installation destinations. Every installation or action with rkhunter is always done in root in konsole. This seems that it is a software issue, and even though it seems to be installing correctly, it isn't doing so. Mark -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
We got some work to do -- see below: On 05/15/2018 09:06 AM, Mark Misulich wrote:
Checking installation directories: Directory /usr/local/share/doc/rkhunter-1.4.6: creating: OK Directory /usr/local/share/man/man8: exists and is writable. Directory /etc: exists and is writable. Directory /usr/local/bin: exists and is writable. Directory /usr/local/lib64: exists and is writable. Directory /var/lib: exists and is writable. Directory /usr/local/lib64/rkhunter/scripts: creating: OK Directory /var/lib/rkhunter/db: creating: OK Directory /var/lib/rkhunter/tmp: creating: OK Directory /var/lib/rkhunter/db/i18n: creating: OK Directory /var/lib/rkhunter/db/signatures: creating: OK ... Installation complete linux-2b8:/home/lx1/Downloads/rkhunter-1.4.6 # rkhunter --propupd If 'rkhunter' is not a typo you can use command-not-found to lookup the package that contains it, like this: cnf rkhunter
Same as before I reworked everything. Here are the results of the list results you requested: ...
Mark
First, you did not install to /usr instead you installed to /usr/local (which is fine, and when not installing from an .rpm -- where you should install to), but not apparently you do not have `/usr/local/bin` in your PATH. (which is strange, I always thought that was standard) Do this: echo $PATH and see if you have /usr/local/bin inlcuded or you can just do [[ $PATH =~ /usr/local/bin ]] || export "${PATH}:/usr/local/bin" (which you can put in your .bashrc to insure the path is always checked for and appended) now try rkhunter if that fails then post the output of ls -al /usr/local/bin/rkhunter (you can look at it and make sure it is executable by your normal user) if not, then you can make it so by su'ing to root and then chmod 0755 /usr/local/bin/rkhunter -- David C. Rankin, J.D.,P.E. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
* David C. Rankin <drankinatty@suddenlinkmail.com> [05-16-18 02:56]:
We got some work to do -- see below:
On 05/15/2018 09:06 AM, Mark Misulich wrote:
Checking installation directories: Directory /usr/local/share/doc/rkhunter-1.4.6: creating: OK Directory /usr/local/share/man/man8: exists and is writable. Directory /etc: exists and is writable. Directory /usr/local/bin: exists and is writable. Directory /usr/local/lib64: exists and is writable. Directory /var/lib: exists and is writable. Directory /usr/local/lib64/rkhunter/scripts: creating: OK Directory /var/lib/rkhunter/db: creating: OK Directory /var/lib/rkhunter/tmp: creating: OK Directory /var/lib/rkhunter/db/i18n: creating: OK Directory /var/lib/rkhunter/db/signatures: creating: OK ... Installation complete linux-2b8:/home/lx1/Downloads/rkhunter-1.4.6 # rkhunter --propupd If 'rkhunter' is not a typo you can use command-not-found to lookup the package that contains it, like this: cnf rkhunter
Same as before I reworked everything. Here are the results of the list results you requested: ...
Mark
First, you did not install to /usr instead you installed to /usr/local (which is fine, and when not installing from an .rpm -- where you should install to), but not apparently you do not have `/usr/local/bin` in your PATH. (which is strange, I always thought that was standard)
indeed, /etc/login.defs ENV_PATH PATH=/usr/local/bin:/usr/bin:/bin rpm -qf /etc/login.defs shadow-4.5-8.1.x86_64 Tumbleweed, current -- (paka)Patrick Shanahan Plainfield, Indiana, USA @ptilopteri http://en.opensuse.org openSUSE Community Member facebook/ptilopteri Registered Linux User #207535 @ http://linuxcounter.net Photos: http://wahoo.no-ip.org/piwigo paka @ IRCnet freenode -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Wed, 2018-05-16 at 01:53 -0500, David C. Rankin wrote:
We got some work to do -- see below:
On 05/15/2018 09:06 AM, Mark Misulich wrote:
Checking installation directories: Directory /usr/local/share/doc/rkhunter-1.4.6: creating: OK Directory /usr/local/share/man/man8: exists and is writable. Directory /etc: exists and is writable. Directory /usr/local/bin: exists and is writable. Directory /usr/local/lib64: exists and is writable. Directory /var/lib: exists and is writable. Directory /usr/local/lib64/rkhunter/scripts: creating: OK Directory /var/lib/rkhunter/db: creating: OK Directory /var/lib/rkhunter/tmp: creating: OK Directory /var/lib/rkhunter/db/i18n: creating: OK Directory /var/lib/rkhunter/db/signatures: creating: OK ... Installation complete linux-2b8:/home/lx1/Downloads/rkhunter-1.4.6 # rkhunter --propupd If 'rkhunter' is not a typo you can use command-not-found to lookup the package that contains it, like this: cnf rkhunter
Same as before I reworked everything. Here are the results of the list results you requested: ...
Mark
First, you did not install to /usr instead you installed to /usr/local (which is fine, and when not installing from an .rpm -- where you should install to), but not apparently you do not have `/usr/local/bin` in your PATH. (which is strange, I always thought that was standard)
Do this:
echo $PATH
and see if you have /usr/local/bin inlcuded
or you can just do
[[ $PATH =~ /usr/local/bin ]] || export "${PATH}:/usr/local/bin"
(which you can put in your .bashrc to insure the path is always checked for and appended)
now try
rkhunter
if that fails then post the output of
ls -al /usr/local/bin/rkhunter
(you can look at it and make sure it is executable by your normal user)
if not, then you can make it so by su'ing to root and then
chmod 0755 /usr/local/bin/rkhunter
-- David C. Rankin, J.D.,P.E.
Hi, here are results from your instructions: linux-2b8:/usr/local/bin # echo $PATH /sbin:/bin:/usr/sbin:/usr/bin linux-2b8:/usr/local/bin # [[ $PATH =~ /usr/local/bin ]] || export "{PATH}:/usr/local/bin" bash: export: `{PATH}:/usr/local/bin': not a valid identifier linux-2b8:/usr/local/bin # ls -al /usr/local/bin/rkhunter -rwx------ 1 root root 575851 May 15 09:00 /usr/local/bin/rkhunter linux-2b8:/usr/local/bin # chmod 0755 /usr/local/bin/rkhunter linux-2b8:/usr/local/bin # rkhunter --propupdate If 'rkhunter' is not a typo you can use command-not-found to lookup the package that contains it, like this: cnf rkhunter -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Op woensdag 16 mei 2018 15:19:58 CEST schreef Mark Misulich:
On Wed, 2018-05-16 at 01:53 -0500, David C. Rankin wrote:
We got some work to do -- see below:
On 05/15/2018 09:06 AM, Mark Misulich wrote:
Checking installation directories: Directory /usr/local/share/doc/rkhunter-1.4.6: creating: OK Directory /usr/local/share/man/man8: exists and is writable. Directory /etc: exists and is writable. Directory /usr/local/bin: exists and is writable. Directory /usr/local/lib64: exists and is writable. Directory /var/lib: exists and is writable. Directory /usr/local/lib64/rkhunter/scripts: creating: OK Directory /var/lib/rkhunter/db: creating: OK Directory /var/lib/rkhunter/tmp: creating: OK Directory /var/lib/rkhunter/db/i18n: creating: OK Directory /var/lib/rkhunter/db/signatures: creating: OK
...
Installation complete linux-2b8:/home/lx1/Downloads/rkhunter-1.4.6 # rkhunter --propupd If 'rkhunter' is not a typo you can use command-not-found to lookup the
package that contains it, like this: cnf rkhunter
Same as before I reworked everything. Here are the results of the list results you requested: ...
Mark
First, you did not install to /usr instead you installed to /usr/local (which is fine, and when not installing from an .rpm -- where you should install to), but not apparently you do not have `/usr/local/bin` in your PATH. (which is strange, I always thought that was standard)
Do this: echo $PATH
and see if you have /usr/local/bin inlcuded
or you can just do
[[ $PATH =~ /usr/local/bin ]] || export "${PATH}:/usr/local/bin"
(which you can put in your .bashrc to insure the path is always checked for and appended)
now try
rkhunter
if that fails then post the output of
ls -al /usr/local/bin/rkhunter
(you can look at it and make sure it is executable by your normal user)
if not, then you can make it so by su'ing to root and then
chmod 0755 /usr/local/bin/rkhunter
Hi,
here are results from your instructions:
linux-2b8:/usr/local/bin # echo $PATH /sbin:/bin:/usr/sbin:/usr/bin
linux-2b8:/usr/local/bin # [[ $PATH =~ /usr/local/bin ]] || export "{PATH}:/usr/local/bin" bash: export: `{PATH}:/usr/local/bin': not a valid identifier why not export PATH=$PATH:/usr/local/bin; run_whatever_program ? The ~ in your statement makes it point to /root/usr/local/bin.
linux-2b8:/usr/local/bin # ls -al /usr/local/bin/rkhunter -rwx------ 1 root root 575851 May 15 09:00 /usr/local/bin/rkhunter
linux-2b8:/usr/local/bin # chmod 0755 /usr/local/bin/rkhunter linux-2b8:/usr/local/bin # rkhunter --propupdate If 'rkhunter' is not a typo you can use command-not-found to lookup the package that contains it, like this: cnf rkhunter
-- Gertjan Lettink a.k.a. Knurpht openSUSE Board Member openSUSE Forums Team -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Knurpht, et al -- ...and then Knurpht @ openSUSE said... % % Op woensdag 16 mei 2018 15:19:58 CEST schreef Mark Misulich: % > On Wed, 2018-05-16 at 01:53 -0500, David C. Rankin wrote: ... % > > % > > [[ $PATH =~ /usr/local/bin ]] || export "${PATH}:/usr/local/bin" ... % > % > linux-2b8:/usr/local/bin # [[ $PATH =~ /usr/local/bin ]] || export % > "{PATH}:/usr/local/bin" % > bash: export: `{PATH}:/usr/local/bin': not a valid identifier % why not % export PATH=$PATH:/usr/local/bin; run_whatever_program % ? That's basically what David told him to do. Unfortunately, Mark left off the $ and so he suddenly wasn't really talking about a variable but instead a fixed string, which of course one cannot export. Now, the export "${PATH}:/usr/local/bin" doesn't quite look right to me, either, but since we didn't even get that far we don't have to worry about that :-) % The ~ in your statement makes it point to /root/usr/local/bin. Not quite... That was a match =~ operator, which basically says "is the string on the right matched anywhere in the string on the left?" a la echo | grep. I'm not a fan because it's a bash-ism and I'm generally a Bourne purist for portability, but it is indeed one of the fun things you can do in more advanced shells like bash or ksh. HTH & HAND :-D -- David T-G See http://justpickone.org/davidtg/email/ See http://justpickone.org/davidtg/tofu.txt -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
* David T-G <davidtg-robot@justpickone.org> [05-16-18 11:07]: [...]
Now, the
export "${PATH}:/usr/local/bin"
doesn't quite look right to me, either, but since we didn't even get that far we don't have to worry about that :-)
and for me, getting there is no gain. yields: not a valid identifier but echo ${PATH} appears valid, lists current path var. -- (paka)Patrick Shanahan Plainfield, Indiana, USA @ptilopteri http://en.opensuse.org openSUSE Community Member facebook/ptilopteri Registered Linux User #207535 @ http://linuxcounter.net Photos: http://wahoo.no-ip.org/piwigo paka @ IRCnet freenode -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Hello, On Wed, 16 May 2018, Knurpht @ openSUSE wrote:
Op woensdag 16 mei 2018 15:19:58 CEST schreef Mark Misulich:
[[ $PATH =~ /usr/local/bin ]] || export "${PATH}:/usr/local/bin" [..]
On Wed, 2018-05-16 at 01:53 -0500, David C. Rankin wrote: [..] linux-2b8:/usr/local/bin # [[ $PATH =~ /usr/local/bin ]] || export "{PATH}:/usr/local/bin"
That should have been export PATH="$PATH:/usr/local/bin"
bash: export: `{PATH}:/usr/local/bin': not a valid identifier why not export PATH=$PATH:/usr/local/bin; run_whatever_program ? The ~ in your statement makes it point to /root/usr/local/bin.
RTFM. ==== man bash ==== [[ expression ]] [..] An additional binary operator, =~, is available, with the same precedence as == and !=. When it is used, the string to the right of the operator is considered an extended regular expres- sion and matched accordingly (as in regex(3)). The return value is 0 if the string matches the pattern, and 1 otherwise. ==== HTH, -dnh -- A mouse is a device used to focus xterms. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 05/16/2018 10:16 AM, David Haller wrote:
That should have been
export PATH="$PATH:/usr/local/bin"
yup -- I must have been sleeping... -- David C. Rankin, J.D.,P.E. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
* Mark Misulich <munguanaweza@gmail.com> [05-16-18 09:22]: [...]
here are results from your instructions:
linux-2b8:/usr/local/bin # echo $PATH /sbin:/bin:/usr/sbin:/usr/bin
linux-2b8:/usr/local/bin # [[ $PATH =~ /usr/local/bin ]] || export "{PATH}:/usr/local/bin" bash: export: `{PATH}:/usr/local/bin': not a valid identifier
linux-2b8:/usr/local/bin # ls -al /usr/local/bin/rkhunter -rwx------ 1 root root 575851 May 15 09:00 /usr/local/bin/rkhunter
linux-2b8:/usr/local/bin # chmod 0755 /usr/local/bin/rkhunter linux-2b8:/usr/local/bin # rkhunter --propupdate If 'rkhunter' is not a typo you can use command-not-found to lookup the package that contains it, like this: cnf rkhunter
what does this show: grep "/usr/local/bin" /etc/login.defs do: export PATH=/usr/local/bin:$PATH sudo updatedb which rkhunter -- (paka)Patrick Shanahan Plainfield, Indiana, USA @ptilopteri http://en.opensuse.org openSUSE Community Member facebook/ptilopteri Registered Linux User #207535 @ http://linuxcounter.net Photos: http://wahoo.no-ip.org/piwigo paka @ IRCnet freenode -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
* Patrick Shanahan <paka@opensuse.org> [05-16-18 10:10]:
* Mark Misulich <munguanaweza@gmail.com> [05-16-18 09:22]: [...]
here are results from your instructions:
linux-2b8:/usr/local/bin # echo $PATH /sbin:/bin:/usr/sbin:/usr/bin
linux-2b8:/usr/local/bin # [[ $PATH =~ /usr/local/bin ]] || export "{PATH}:/usr/local/bin" bash: export: `{PATH}:/usr/local/bin': not a valid identifier
linux-2b8:/usr/local/bin # ls -al /usr/local/bin/rkhunter -rwx------ 1 root root 575851 May 15 09:00 /usr/local/bin/rkhunter
linux-2b8:/usr/local/bin # chmod 0755 /usr/local/bin/rkhunter linux-2b8:/usr/local/bin # rkhunter --propupdate If 'rkhunter' is not a typo you can use command-not-found to lookup the package that contains it, like this: cnf rkhunter
what does this show: grep "/usr/local/bin" /etc/login.defs
do: export PATH=/usr/local/bin:$PATH
sudo updatedb
which rkhunter
also be aware that the above method of changing the $PATH is only for the particular bash/sh/... session which is current. once you close it the path change is gone. to make the path permanent for current <user> add the export statement to ~/.profile or to make the path change permanent for the system, add the export statement to /ect/profile.local (for openSUSE). see https://www.quora.com/What-is-profile-file-in-Linux -- (paka)Patrick Shanahan Plainfield, Indiana, USA @ptilopteri http://en.opensuse.org openSUSE Community Member facebook/ptilopteri Registered Linux User #207535 @ http://linuxcounter.net Photos: http://wahoo.no-ip.org/piwigo paka @ IRCnet freenode -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Wed, 2018-05-16 at 10:18 -0400, Patrick Shanahan wrote:
* Patrick Shanahan <paka@opensuse.org> [05-16-18 10:10]:
* Mark Misulich <munguanaweza@gmail.com> [05-16-18 09:22]: [...]
do: export PATH=/usr/local/bin:$PATH
sudo updatedb
which rkhunter
also be aware that the above method of changing the $PATH is only for the particular bash/sh/... session which is current. once you close it the path change is gone.
or to make the path change permanent for the system, add the export statement to /ect/profile.local (for openSUSE).
Hi, I used the export statement export PATH=/usr/local/bin:$PATH in my current bash session, and after that I was able to start rkhunter as normal from root. Of course, when I closed the bash session and started a new bash root session, it didn't work until I used the export statement once again. I wanted to make the path change permanent for the system. I found that there was no /etc/profile.local so I made a profile.local file in /etc and copied the export statement in it. I tried it out, and rkhunter wouldn't start. So I must be doing it incorrectly. Can you provide me with instructions as to how to do this correctly? Thanks, Mark -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
* Mark Misulich <munguanaweza@gmail.com> [05-16-18 19:49]: [...]
I used the export statement
export PATH=/usr/local/bin:$PATH
in my current bash session, and after that I was able to start rkhunter as normal from root. Of course, when I closed the bash session and started a new bash root session, it didn't work until I used the export statement once again.
I wanted to make the path change permanent for the system. I found that there was no /etc/profile.local so I made a profile.local file in /etc and copied the export statement in it. I tried it out, and rkhunter wouldn't start. So I must be doing it incorrectly. Can you provide me with instructions as to how to do this correctly?
the "permanent" change is only affected upon a new login. logout completely and login again and check the PATH for /usr/local/bin, echo $PATH it should be there and remain until you change it. the reason for /etc/profile.local is so system updates will not alter it. another solution would be to install shadow which I *thought* was installed automagically, apparently I was wrong. zypper if shadow/rpm -qi shadow: This package includes the necessary programs for converting plain password files to the shadow password format and to manage user and group accounts. or as someone else suggested, add it to ~/.bashrc or ~/.bash.profile which is initiated upon opening a new instance of <shell,program>, iirc. I would prefer /etc/profile.local. good luck, -- (paka)Patrick Shanahan Plainfield, Indiana, USA @ptilopteri http://en.opensuse.org openSUSE Community Member facebook/ptilopteri Registered Linux User #207535 @ http://linuxcounter.net Photos: http://wahoo.no-ip.org/piwigo paka @ IRCnet freenode -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Wed, 2018-05-16 at 20:06 -0400, Patrick Shanahan wrote:
* Mark Misulich <munguanaweza@gmail.com> [05-16-18 19:49]: [...]
I used the export statement
export PATH=/usr/local/bin:$PATH
in my current bash session, and after that I was able to start rkhunter as normal from root. Of course, when I closed the bash session and started a new bash root session, it didn't work until I used the export statement once again.
I wanted to make the path change permanent for the system. I found that there was no /etc/profile.local so I made a profile.local file in /etc and copied the export statement in it. I tried it out, and rkhunter wouldn't start. So I must be doing it incorrectly. Can you provide me with instructions as to how to do this correctly?
the "permanent" change is only affected upon a new login. logout completely and login again and check the PATH for /usr/local/bin, echo $PATH it should be there and remain until you change it. the reason for /etc/profile.local is so system updates will not alter it. another solution would be to install shadow which I *thought* was installed automagically, apparently I was wrong. zypper if shadow/rpm -qi shadow: This package includes the necessary programs for converting plain password files to the shadow password format and to manage user and group accounts.
or as someone else suggested, add it to ~/.bashrc or ~/.bash.profile which is initiated upon opening a new instance of <shell,program>, iirc.
I would prefer /etc/profile.local.
good luck, -- (paka)Patrick Shanahan Plainfield, Indiana
Hi, Thanks for the suggestions. I found that shadow was already installed, but I can't start it. I think that it must be affected by the same issue as rkhunter was. It also does not appear in the application menu. As far as /etc/profile.local I think I just don't know the correct way to create the file. Here's what I did, but since it didn't work I think I must have done it wrong. Can you suggest some corrections? cat <<EOF>/etc/profile.local export PATH=/usr/local/bin:$PATH EOF Mark -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Wednesday, 2018-05-16 at 21:48 -0400, Mark Misulich wrote:
On Wed, 2018-05-16 at 20:06 -0400, Patrick Shanahan wrote:
I found that shadow was already installed, but I can't start it.
Shadow is not a program, so you can not start it. rpm -ql shadow | less to examine what it is.
As far as /etc/profile.local I think I just don't know the correct way to create the file.
With any editor as root. You can see the syntax in "/etc/profile". Example: PATH=/usr/lib/restricted/bin export PATH - -- Cheers, Carlos E. R. (from openSUSE 42.3 x86_64 "Malachite" at Telcontar) -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iEYEARECAAYFAlr86SgACgkQtTMYHG2NR9Wo+wCdFRocT+DP8uCDyOWz7Uk9aWN+ 9CoAoJfKXI9Q7YcsbR1JDwRMqYXsYzVW =xS6l -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
* Mark Misulich <munguanaweza@gmail.com> [05-16-18 21:50]:
On Wed, 2018-05-16 at 20:06 -0400, Patrick Shanahan wrote:
* Mark Misulich <munguanaweza@gmail.com> [05-16-18 19:49]: [...]
I used the export statement
export PATH=/usr/local/bin:$PATH
in my current bash session, and after that I was able to start rkhunter as normal from root. Of course, when I closed the bash session and started a new bash root session, it didn't work until I used the export statement once again.
I wanted to make the path change permanent for the system. I found that there was no /etc/profile.local so I made a profile.local file in /etc and copied the export statement in it. I tried it out, and rkhunter wouldn't start. So I must be doing it incorrectly. Can you provide me with instructions as to how to do this correctly?
the "permanent" change is only affected upon a new login. logout completely and login again and check the PATH for /usr/local/bin, echo $PATH it should be there and remain until you change it. the reason for /etc/profile.local is so system updates will not alter it. another solution would be to install shadow which I *thought* was installed automagically, apparently I was wrong. zypper if shadow/rpm -qi shadow: This package includes the necessary programs for converting plain password files to the shadow password format and to manage user and group accounts.
or as someone else suggested, add it to ~/.bashrc or ~/.bash.profile which is initiated upon opening a new instance of <shell,program>, iirc.
I would prefer /etc/profile.local.
Hi, Thanks for the suggestions.
I found that shadow was already installed, but I can't start it. I think that it must be affected by the same issue as rkhunter was. It also does not appear in the application menu.
As far as /etc/profile.local I think I just don't know the correct way to create the file. Here's what I did, but since it didn't work I think I must have done it wrong. Can you suggest some corrections?
cat <<EOF>/etc/profile.local export PATH=/usr/local/bin:$PATH EOF
follow Carlos' suggestion, edit with a text editor you say shadow was already installed, what version and what does the following provide: grep "/usr/local/bin" /etc/login.defs every system I have provides: ENV_PATH PATH=/usr/local/bin:/usr/bin:/bin which should place "/usr/local/bin" into your $PATH -- (paka)Patrick Shanahan Plainfield, Indiana, USA @ptilopteri http://en.opensuse.org openSUSE Community Member facebook/ptilopteri Registered Linux User #207535 @ http://linuxcounter.net Photos: http://wahoo.no-ip.org/piwigo paka @ IRCnet freenode -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Hello, On Wed, 16 May 2018, Patrick Shanahan wrote:
do: export PATH=/usr/local/bin:$PATH
sudo updatedb
ITYM: hash -r HTH, -dnh -- panic("IRQ, you lose..."); linux-2.2.16/arch/mips/sgi/kernel/indy_int.c -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 05/16/2018 08:19 AM, Mark Misulich wrote:
linux-2b8:/usr/local/bin # [[ $PATH =~ /usr/local/bin ]] || export "{PATH}:/usr/local/bin" bash: export: `{PATH}:/usr/local/bin': not a valid identifier
Yes, sorry, my bad, it should be: [[ $PATH =~ /usr/local/bin ]] || export PATH="${PATH}:/usr/local/bin" (it was late....) Also, as Patrick noted, the /usr/local/bin path component is automatically provided if you install the 'shadow' rpm. (which I've never seen not pulled in by some dependency I have) To get rkhunter running, just paste the above command at the command line, since we know you don't have it in your path, you can simply omit the test for it and do: $ export PATH="${PATH}:/usr/local/bin" You should install the shadow package, e.g. as root # zypper in shadow If you don't want to install it for some reason, then add the full: [[ $PATH =~ /usr/local/bin ]] || export PATH="${PATH}:/usr/local/bin" to your .bashrc (so that it checks whether /usr/local/bin is already part of your path before it adds it again -- so you don't end up with multiple additions) -- David C. Rankin, J.D.,P.E. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Wed, 2018-05-16 at 12:54 -0500, David C. Rankin wrote:
On 05/16/2018 08:19 AM, Mark Misulich wrote:
linux-2b8:/usr/local/bin # [[ $PATH =~ /usr/local/bin ]] || export "{PATH}:/usr/local/bin" bash: export: `{PATH}:/usr/local/bin': not a valid identifier
Yes, sorry, my bad, it should be:
[[ $PATH =~ /usr/local/bin ]] || export PATH="${PATH}:/usr/local/bin"
(it was late....)
Also, as Patrick noted, the /usr/local/bin path component is automatically provided if you install the 'shadow' rpm. (which I've never seen not pulled in by some dependency I have)
To get rkhunter running, just paste the above command at the command line, since we know you don't have it in your path, you can simply omit the test for it and do:
$ export PATH="${PATH}:/usr/local/bin"
You should install the shadow package, e.g. as root
# zypper in shadow
If you don't want to install it for some reason, then add the full:
[[ $PATH =~ /usr/local/bin ]] || export PATH="${PATH}:/usr/local/bin"
to your .bashrc
(so that it checks whether /usr/local/bin is already part of your path before it adds it again -- so you don't end up with multiple additions)
-- David C. Rankin, J.D.,P.E.
Hi, I've been quite busy elsewhere and haven't had time to work on this till this evening. I tried to modify /etc/profile several times in various ways and couldn't get the PATH changed to include /usr/local/bin I couldn't figure out how to use shadow. I modified the etc/bash.bashrc as David suggested, this evening by placing the [[ $PATH =~ /usr/local/bin ]] || export PATH="${PATH}:/usr/local/bin" on the last line of the bash.bashrc script as below: if test "$restricted" = true -a -z "$PROFILEREAD" ; then PATH=/usr/lib/restricted/bin export PATH fi [[ $PATH =~ /usr/local/bin ]] || export PATH="${PATH}:/usr/local/bin" # # End of /etc/bash.bashrc # That got the rkhunter program working in konsole after I logged back out and in again as my user, and then opened konsole and switched to root. I used zypper dup my 42.3 on a different computer to upgradet to 15.0, and found that rkhunter also doesn't work on it now after the upgrade. So I will use this same procedure to get it working, since it seems that /usr/local/bin was removed in 15.0 PATH by the operating system programmers. Thanks for the help. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 05/25/2018 08:03 PM, Mark Misulich wrote:
That got the rkhunter program working in konsole after I logged back out and in again as my user, and then opened konsole and switched to root.
I used zypper dup my 42.3 on a different computer to upgradet to 15.0, and found that rkhunter also doesn't work on it now after the upgrade. So I will use this same procedure to get it working, since it seems that /usr/local/bin was removed in 15.0 PATH by the operating system programmers.
Thanks for the help.
Show the output of $ rpm -qi rkhunter on your 15 zypper dup'ed system. -- David C. Rankin, J.D.,P.E. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
participants (7)
-
Carlos E. R.
-
David C. Rankin
-
David Haller
-
David T-G
-
Knurpht @ openSUSE
-
Mark Misulich
-
Patrick Shanahan