Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[solved] where to put scripts?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
thorpe
l33t
l33t


Joined: 09 May 2005
Posts: 618
Location: Sydney, Australia.

PostPosted: Wed Nov 02, 2005 11:00 pm    Post subject: [solved] where to put scripts? Reply with quote

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
View user's profile Send private message
Raffi
l33t
l33t


Joined: 17 Mar 2003
Posts: 731
Location: Moscow, Id.

PostPosted: Wed Nov 02, 2005 11:03 pm    Post subject: Reply with quote

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
View user's profile Send private message
thorpe
l33t
l33t


Joined: 09 May 2005
Posts: 618
Location: Sydney, Australia.

PostPosted: Thu Nov 03, 2005 2:55 am    Post subject: Reply with quote

thankyou very much. problem solved.

learn something everyday huh?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
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