General :: Adjusting $PATH In /etc/profile Does Not Affect Root
May 25, 2011
I added a directory to the $PATH variable in /etc/profile. This works for my user account but not for root. It's easy to add it to my /root/.bashrc but I would like to understand whats's wrong. It's a widely unmodified Debian 6 so I think my changes should do the trick.
Here is what my /etc/profile looks like:
# /etc/profile: system-wide .profile file for the Bourne shell (sh(1))
# and Bourne compatible shells (bash(1), ksh(1), ash(1), ...).
if [ "`id -u`" -eq 0 ]; then
[code]....
Edit: The path I added is the distcc-stuff. Here is what echo $PATH tells me:
I've been handed the role of looking after my company ftp server which is running redhat. I've logged on as root & have somehow lost all of the menu items from the grey toolbar. All i now have on the desktop are the disk & partition icons. I haven't changed / added anything, just logged on to the box. The only way i can log out or reboot is to press in the server power button which cannot be right ? Is there anyway of making the menu options visible so that i can at least familiarise myself with the O/S ?
I'm trying to launch a root terminal with a profile preloaded, but I'm not yet used to the way gnome handles its syntax, so the default link to root terminal:
Code:
Apparently, the method using gnome-terminal is to add a trailing
Code:
But this did not work, probably because in this case I'm not calling directly on gnome's terminal.
I've noticed that the root account $PATH does not include /usr/local/bin or /usr/local/sbin by default. Are there any potential issues that could arise from adding those directories to the path? If so, what is the best way to make sure your shell finds executables in those directories, without affecting the stability and security of the system?
I can do su - and then type in my root password and then change users, but if I try to log in to the root profile, the same password doesn't work. What can I do to reset the root profile password?
I'm trying to get Xorg running on a Dell 2850.I can't get it to work.I installed xorg-x11-drivers via yum, and used both "Radeon / ati" drivers, including the default vesa.
Here are the main errors (error log file attached):
Could not init font path element unix/:7100, removing from list! (**) RADEON(0): RADEONSaveScreen(2) localuser:root being added to access control list No profile for user 'root' found
[code]...
and at the end it says:
FreeFontPath: FPE "built-ins" refcount is 2, should be 1; fixing.
I have a 4gb USB thumb drive with Ubantu 9 on it and it looks like I have over 3gb free but I only have 4mb free in the documents Directory. w do I increase the size of the directory so I can add my Doc files?
I am afraid to ask with so many things changing around in each new release.Where would one add a custom script to execute when logging and shutting down in into a user profile like /home/test or /root ?would this be rc.local?
I'm taking here about tins of directories, thousands of files. I'm looking to find a command that makes me able to move the results above to another path, and to create that path once it doesn't exist like below:
i ran into a problem while isntalling xine player on fedora 11, i first of all installed its core engine 'xine-lib' successfully with standard prefix! when i run the './configure' for its frontend (xine-ui) it gives this error.
No package 'libxine' found Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables XINE_CFLAGS and XINE_LIBS to avoid the need to call pkg-config.See the pkg-config man page for more details.
I have a program that takes a relative path as input appends it to a some path string to get the actual path.
Now all I can input is the relative path. So if I want to go one level above my input will be ../mypath.
If I know the depth of the path used internally, I can use .. as many times to go to the root directory and then give the absolute path. But suppose I do not know the depth of the directory, can I construct a relative path string such that it considers it as a relative path. One way could be to have enough .. in the path string so that I can force an absolute path for some maximum depth of path.
Is there some path string syntax that I am not aware of but can achieve this?
Experimenting with shell variables, accidentally deleted the path variable how could I return to the original path value. What kinds of problems will I have if I don't have a path variable.
A while back I installed Dreamlinux 3.5 Gnome edition using ext2. When I attempted to use the email address books I imported from the Dreamlinux3.5 XFCE edition, which had been ext3, I discovered that none of the email addresses could be mailed to. I had to manually type in the addresses.
When I reinstalled Dreamlinux 3.5 Gnome using ext3, the same backup files that did not work in ext2 now work just fine. The question is, was this a "broken data" problem caused by the switch to ext2 file system or something else? Has anyone else experienced this?
I have a path c:windowsackup I need this string to be changed into /windows/back/up I used the command -bash-3.00$ echo windackup | sed 's/\//g' but the output is windbackup
prefix=user@my-server: find . -depth -type d -name .git -printf '%h�' | while read -d "" path ; do ( cd "$path" || exit $?
[code]....
How shall i go about changing the absolute path to relative path, so that /home/git/mirror/android/adb/ndk.git gets converted to /mirror/android/adb/ndk.git //echo <command> "$prefix$PWD.git" ?? - anything for relative path?
I've already gotten into the .mozilla folder and found the profiles.ini file. My windows XP system has it's Documents and Settings folder on a seperate drive (D:Documents and settings) And I've located the profile (application datamozillafirefoxprofiles) Now all I need to do is put the path into the profiles.ini file in the .mozilla folder in Ubuntu. The problem is I don't know exactly how to format it.
In windows the path is:
How would I translate this into something ubuntu "follows?" I already have the profile name changed as well.
After upgrading to CentOS 5.4, my root path seems screwed.The issue is present for CRONJOBs that run as the root user as well as when I su to the user through SSH.
I need the following path ALWAYS: PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/X11R6/bin It currently only gives root:
I just booted ubuntu from a disk that I burned to try and salvage some files off a hard drive with a failed boot sector (maybe. not sure what the problem is,). Anyway, I can see the files, and I have a large portable hard drive that I can use (a MyPassport 320gig, if I recall correctly). I'm having trouble accessing the drive, and I think it might be because there's something popping up in the task bar that I can't see. Unfortunately, I can't see the task bar! My screen's resolution is off, and I'm having trouble adjusting it. I browsed the various settings and I couldn't figure out any way to change it.
Is there anything I can do? EDIT: Oops! I didn't look into the Monitors options... how embarrassing.
EDIT2: Okay, looks like I can mess about with the resolutions, but all of them still deny me access to the full screen - still can't see the task bar.
I want to add a path (/usr/sys) to the global $PATH. I will use this to test commands and scripts, which I don't want to be mixed up with regular commands. I've added the path to /etc/environment. When I start a terminal session under my user account, the path is included in the $PATH variable. However, when I start a root terminal, it is not. Is there a way to to change $PATH on one place where it will also affect the root terminal, or do I have to change it on 2 locations?
How do I set the PYTHONPATH for the root user only? Or at least add to the python path for the root user? I need to read from the /var/log/apache2/access.log in my python script, so I need to use sudo for my script to be able to read from it.I tried setting the PYTHONPATH in /root/.bashrc but that didn't work. I don't want to use a .pth file because I don't want the directory to be on the path for all users due to import collisions.
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.
I am trying to set my java path so that it is in effect for all users including the root user. I set the path correctly in /etc/profile and that works for my personal user, but when i try to run the same commands using sudo, i get messages saying that it can't find the java path.
I've setup dimdim (opensource, centos 5.3) and noticed yum & rpm commands fail when executed as root because it uses librpmio from openoffice3 instead of /usr/lib (I'm running from memory so I may have misstyped). But sudo doesn't have this problem.
How can root's search path be different, especially after I state /usr & /usr/lib at the top of /etc/ld.so.conf.
I'm running a server with CentOS 5 where the software that needs to run on the server uses ifconfig to verify the system IPv4.The problem is that /sbin isn't set for the user that is supposed to run the software (sadmin) which means the software can't execute ifconfig and thus terminates.now the workaround I've been using is simply to input.