View previous topic :: View next topic |
Author |
Message |
thorpe l33t
Joined: 09 May 2005 Posts: 618 Location: Sydney, Australia.
|
Posted: Wed Nov 02, 2005 11:00 pm Post subject: [solved] where to put scripts? |
|
|
ok... so ive created a simple log script so i can keep track of any changes i might make, kinda like a diary. i placed this script in /usr/local/bin so that all users could have access to it (it creates logs in the users home dir) and have been happily using it to keep track of stuff whilst logged in as root. i have now created an everyday user account 'thorpe', and yes, thorpe also has access to this script. however, when i su to root from thorpe, the script is no longer available. if i echo $path while su'd all i see is /sbin:/bin:/usr/sbin:/usr/bin.
i assume this is something to do with me not being in a login shell. im sure there is a good reason for /usr/local/* to be missing from my path, but could someone maybe give me a quick explination. also, where do you suggest i put this script?
im actually thinking that only root needs access to this script because i built it with the intention of keeping trak of any changes i made to the system, configs etc. i just dont really want to put it in /sbin or /usr/sbin with all the other stuff in there. of course i could make a /bin in my roots home, but is that really how things should be done?
sorry, pretty new to this stuff.
Last edited by thorpe on Thu Nov 03, 2005 2:55 am; edited 1 time in total |
|
Back to top |
|
|
Raffi l33t
Joined: 17 Mar 2003 Posts: 731 Location: Moscow, Id.
|
Posted: Wed Nov 02, 2005 11:03 pm Post subject: |
|
|
Do you su with su or su -? The - tells su to log you in. It should duplicate the paths you would be using logged in as root. It should also cd you to root's home directory. |
|
Back to top |
|
|
thorpe l33t
Joined: 09 May 2005 Posts: 618 Location: Sydney, Australia.
|
Posted: Thu Nov 03, 2005 2:55 am Post subject: |
|
|
thankyou very much. problem solved.
learn something everyday huh? |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|