Server :: Root PATH Isn't Right, Can't Change?
Apr 2, 2010
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:
[code]....
View 4 Replies
ADVERTISEMENT
Nov 29, 2010
I just set up an internal mail server for my office using Postfix, Dovecot and Squirrelmail. It works great except for one tiny problem. When I send mail, I address it to user@myoffice (no .com, .net, etc) and it works perfectly. However, somewhere in my work, I screwed up and for whatever dumb reason put myoffice.net somewhere in there and now the return-path always shows up as user@myoffice.net instead of just user@myoffice. Does anyone know how to fix the return-path so that when someone clicks reply it goes to user@myoffice? I've Googled and searched here without finding my answer, apologies if it's out there and I've just failed to see it. Rest assured I have done a couple hours of searching before finally asking for help.
View 7 Replies
View Related
Sep 14, 2009
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
View 7 Replies
View Related
May 31, 2011
Current script:-
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?
View 7 Replies
View Related
Jul 13, 2010
I have 2 machines A and B that are identical (supposedly). I have a file /var/www/html/pca.jarI have a page /var/www/cgi-bin/work/view.cgi
Only the following html works on machine A
<applet code="MainAppApplet.class" archive="/pca.jar" width="550" height="400" name="myApplet" MAYSCRIPT>
[code]....
View 1 Replies
View Related
Mar 19, 2010
I want to change the DocumentRoot on my Apache httpd server.
I have Changed it from the default to var/www/projects
but its not working.
[CODE]
### Section 1: Global Environment
#
# The directives in this section affect the overall operation of Apache,
# such as the number of concurrent requests it can handle or where it
# can find its configuration files.
[Code].....
View 178 Replies
View Related
Mar 16, 2009
How can I change the root password of MYSQL server. I have just finished installation, but I mistakenly typed the wrong root password, and now I need to change it from command line, because I cannot even access the UI.
View 8 Replies
View Related
Aug 31, 2010
I am trying to find the permissions of the directories in the $PATH variable.
I am trying to use the following:
View 1 Replies
View Related
Mar 16, 2010
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?
View 4 Replies
View Related
Aug 11, 2010
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.
View 6 Replies
View Related
May 10, 2010
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.
View 5 Replies
View Related
Mar 2, 2011
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?
View 2 Replies
View Related
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:
$ echo $PATH
/usr/lib/distcc/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
# echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
View 1 Replies
View Related
Jan 27, 2010
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.
View 3 Replies
View Related
Jun 28, 2011
I created a chroot jail in /SECURITY/Jail. But when I used the command 'sudo chroot /SECURITY/Jail' to enter the fake root, I got an error message likegroups: cannot find name for group ID 105groups: cannot find name for group ID 119.
View 1 Replies
View Related
Aug 10, 2011
Accidentally I changed the ownership of all the directories under / to my own instead of root:root. Now I am unable to use sudo and many bad things are happening. Is there a way to revert the changes or change the permissions again to root:root or make sudo work ?
View 3 Replies
View Related
Jul 15, 2009
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.
View 2 Replies
View Related
Jun 25, 2009
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.
View 10 Replies
View Related
May 31, 2011
I have a dual boot Win 7 and Ubuntu 11.04 I just started setting up - and know almost nothing about Linux - I have all my data on separate drives from my OS drives, and would like to "arrive" at my "My Documents" file when i choose "Documents" in Ubuntu.
The location of "My Documents" is - /media/New Volume/My Documents (which I found by dragging the folder onto the terminal) not quite sure how to put in the right command - something like ln -s /media/New Volume/My Documents ~Documents - (but that isn't right and didn't work).I also want to do the same with Music, Pictures and Videos.
View 3 Replies
View Related
Mar 12, 2011
I was changing my sudoers file to give permission of using "sudo" command to all root commands, asking for the password. It works, it's fine. The problem I'm having is with the variable PATH to my user, I think.
In terminal:
normal user:
Code:
ataias@ataias-notebook:~/Downloads$ echo $PATH
/usr/local/bin:/bin:/usr/bin
super user:
Code:
root@ataias-notebook:~# echo $PATH
/usr/local/sbin:/usr/local/bin:/sbin:/usr/sbin:/bin:/usr/bin
As many commands are in /sbin/, root can use them without writing "/sbin/" but I can't do the same cause it's not in my path.
while root do this:
Code:
shutdown -h now
I should do:
Code:
sudo /sbin/shutdown -h now
and I want to use only
Code:
sudo shutdown -h now
I want to change my user's path variable to make it equal to root's path. how to change it? I don't know many things of shell still.
View 5 Replies
View Related
Oct 16, 2010
I want to add my current working directory to the PATH variable and make it permanant in my .bash_profile so I can run my testscript without using the ./ charactors.can this be done?
View 5 Replies
View Related
Jan 3, 2011
I want to change the default path for logs in Jboss running on Fedora box? How to do the same?
View 1 Replies
View Related
Nov 18, 2010
In Linux, Is there a way to remember/change a path to a USB device? In my case, I need linux to remember that my USB serial adapter will stay on /dev/ttyUSB0, but when I unplug it and plug it back in, it switches to /dev/ttyUSB1. I'm using a debian-based distro(mint)
View 1 Replies
View Related
Jun 27, 2010
I'm trying to make a reference to a second hard drive that is not part of the main file system, so I changed all the references to /var/www to /media/HD1/www and I have set the permissions on the entire hard drive to allow reading, and I still get a 403 forbidden error when I attempt to access my site, everything works when I just use the default path. I'm using Ubuntu 10.04 with apache2 installed through the package manager...
View 2 Replies
View Related
Aug 11, 2010
Installed Apache and the default web root was /var/www I wanted to change the cgi-bin to somewhere within the /var/www but I cannot. It only works at /usr/lib/cgi-bin. I am trying to work out the Python CGI to be precise. It works at /usr/lib/cgi-bin but gives a 404 at other places like /home/aj/public_html/cgi-bin or /var/www/cgi-bin.I even tried it with putting a webroot directory in my home directory with a cgi-bin in it and made the changes accordingly in the conf. but the only way it works is when cgi-bin settings point to /usr/lib/cgi-bin otherwise it gives 404.
View 2 Replies
View Related
Sep 20, 2010
when i tried install any package using add/remove software it's go download in the web what i need package.i need change the installation source via cd or dvd drive,.So i want to change the installation source path.Please guide to me how to change the installation source path.
View 5 Replies
View Related
Jan 6, 2011
I have configured 3 drives on my machine.sda1 less than 10 GBsda2 less than 10 GBsda3 450 GBI have installed a software in /usr/share/MyApplicationand as I see /usr/share stays at sda2 and only 2 Gb is free but my application needs more than 3 GB free to run because it creates a temporary file greater than 3 GB during execution.Knows anybody any way how to make MyApplication stays in sda3 drive.
View 9 Replies
View Related
Jun 2, 2010
I compile the c,c++ programs using gcc compiler in ubuntu.And i am using geditor to write a program.when i open a new gedit text file to write a program,by default it is opened in my home directory.but i want to save my all programs in another drive..But i dont know how to change the path ,so that new gedit file open and save in that particular drive or folder where i want it.
View 1 Replies
View Related
Feb 23, 2010
i was tring to create a php daemon using system_daemon class. As i am in Lampp environment i get the problem that , system_daemon is is connecting to default mysql which i have stopped before starting lampp. i would like to know , how i can change its socket path to /opt/lampp/var... ? where i can make this path change?
View 1 Replies
View Related
Feb 5, 2010
We have a custom app that runs on boot on some older hardware running DSL linux, and their startup manager was quite simple. We purchased some newer Asus eeebox's which run xandros and things are quite stable and run nice with 1 exception.The application only runs from the root (/) location. This box auto logs in as 'user' and there is a /home/user/.kde/Autostart folder where you can stick scripts to run at boot. So I have a start.sh script, and with little bash programming tried things such as;
sudo cd /
sudo /startapp.pl
but the errors start spewing with the basic;can't find data/xyz as it's looking in the local.I thought there was a basic cwd (change working directory) but everything I try just forces the run from that location.Any ideas or suggestions are appreciated, but things like can you change the code, etc. can't be done, so it must be a programming thing. The only other thought I had but not sure, can you do a cronjob with @boot or something, that when the box starts, it can run this job as root and fire off?
View 3 Replies
View Related