Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hi,
Long story short, i'm working on my first .deb package. I need to add the /usr/sbin directory to $PATH for root. I think the easiest way to accomplish this is to add a little code to the postinst file.
What's the easiest, most correct way to go about this?
Thanks in advance.
~Chris
that path should already be on any root users profile, it really sounds like you're going about what you want to do the wrong way. What is the actual scenario you're in?
It's a long story, but basically i'm using the Xen kernel for some custom stuff. The executable "xend" is in the /usr/sbin directory (i put it there with my package), but as a super user when you call it from any other directory it won't execute.
I'm pretty new to linux overall, so chances are pretty good that i don't know what i'm doing
If I do a bit of guess work, are you getting root access by just running "su" ? if so, then that will cause exactly what you're seeing, i.e. the root user not getting a full root environment, including paths. run "su -" instead and that will give a full env setup, which will include /usr/sbin.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.