Re: [SuSE Linux] A weekend of frustration!
LenZ, I suspected that there may be a good reason why scripts should not be run from root, after all I guess a lot of damage can be done - hence the security precautions. However, I could not find any info in the Howto's about this. Thanks for this suggestion. I will give it a try. I'm only trying to run a ppp-on script so that shouldn't cause me too much trouble should it?
Hi,
On Mon, 7 Sep 1998, John Chajecki wrote:
Scripts don't run. Neither shell scripts nor perl scripts run despite the '#!/bin/sh' and '#!/usr/bin/perl' lines being present. I just get 'Command not found'. I accidentally found that I *could* execute scripts while logged in as a user other then root so it appears that only root cannot execute scripts.
In both cases I have been working as root because I want to set things up. I am aware of the rule 'use root only for administrative tasks'. Once I am sure everything is working OK I will use a standard user account.
How did you attempt to start these scripts? For security reasons, root does not have the current directory in his PATH environment variable by default. If you want to run a script or executable from the current directory, you have to prefix it with "./". Hope that helps.
LenZ
------------------------------------------------------------------ Lenz Grimmer S.u.S.E. GmbH <A HREF="mailto:grimmer@suse.de">mailto:grimmer@suse.de</A> Gebhardtstrasse 2 <A HREF="http://www.suse.de"><A HREF="http://www.suse.de</A">http://www.suse.de</A</A>> 90762 Fuerth, Germany
- To get out of this list, please send email to majordomo@suse.com with this text in its body: unsubscribe suse-linux-e
John Chajecki, Network Consultant (CNE4) LAN/Wan Team, IT Services, C&TS Town Clerk's Dept., Leicester City Council E-mail: chajj001@leicester.gov.uk, Tel:44 116 252 7661 - To get out of this list, please send email to majordomo@suse.com with this text in its body: unsubscribe suse-linux-e
Hi, On Mon, 7 Sep 1998, John Chajecki wrote:
I suspected that there may be a good reason why scripts should not be run from root, after all I guess a lot of damage can be done - hence the security precautions. However, I could not find any info in the Howto's about this. Thanks for this suggestion. I will give it a try.
Good luck.
I'm only trying to run a ppp-on script so that shouldn't cause me too much trouble should it?
No, if you know, what the script is doing, it should be safe. The omission of the current directory in the search path is just for the case, that (for example) some malicious user has placed an evil program named "ls" in some directory. As soon as root enters this directory and types "ls", guess what happens... If you know, who is working on your system (e.g. at home) you can modify the following entry in /etc/rc.config: CWD_IN_ROOT_PATH="yes". Please rerun SuSEConfig afterwards. Now root also can run files from the current directory without "./" in front of it. Best wishes, LenZ ------------------------------------------------------------------ Lenz Grimmer S.u.S.E. GmbH <A HREF="mailto:grimmer@suse.de">mailto:grimmer@suse.de</A> Gebhardtstrasse 2 <A HREF="http://www.suse.de"><A HREF="http://www.suse.de</A">http://www.suse.de</A</A>> 90762 Fuerth, Germany - To get out of this list, please send email to majordomo@suse.com with this text in its body: unsubscribe suse-linux-e
participants (2)
-
chajj001@leicester.gov.uk
-
grimmer@suse.de