I am trying to add path for root.
In /etc directory there is no .bash_profile file
it has only profile file
can any one say how to add path for root user ?
is it possible to add path in profile file for root user.
If .bash_profile is not there, just create the file. I wouldn't use .bashrc for this, because .bash_profile is executed only by a login shell, whereas .bashrc is executed by all subshells too.
Thanks for the reply.
can you guide me how to create .bash_profile
please tell me this is enough
is it for only root or for all user?
---------- Post updated at 01:48 PM ---------- Previous update was at 01:37 PM ----------
I forget to say one thing
currently i am getting following path.
along with this i want to add one more path then where i need to add new path.
thanks in advance.
If the file is in root's home directory, the file is only valid for root. The file you posted looks right, besides the formatting issue. It is the default .bash_profile file. Just edit the one line, where PATH ist set to something like:
i created file .bash_profile and kept in root's home directory.
then i executed the file,after that the following path got added.
but i trying to execute the command
but its not executing
if i maually exported means its working.
after i login again,it showing previous path only.
so its not executing automatically for every login also
if i execute manually then path getting added
but no use with that path
Currently in my system Red Hat is installed. And Many user connect to my machine via SSH Techia Terminal.
I want to give some users a root level access.
Can anyone please help me how to make it possible. I too searched on the Google but didn't find the correct way
Regards
ADI (4 Replies)
Hi!! one strange problem occurred with my RHEL 5 box.
i'm having logs folder with ownership of non-root user. Created some files with root user under logs folder.
here is the scene:
-rw-r----- 1 root root 1048227 Feb 28 12:34 SystemOut_13.02.28_12.34.10.log
-rw-r----- 1 root root ... (6 Replies)
I've been through many threads before i decide to create a separate thread.
I can't really find the solution to my (simple) problem.
Here's what I'm trying to achieve:
As "canar" user I want to run a command, let's say "/opt/ocaml/bin/ocaml" as "duck" user.
The only to achieve this is to... (1 Reply)
Sorry this maybe a dumb one, but I am root and want to add something to my PATH.
Is the right place to do it here:
/usr/dt/config/dtspcdenv ?
If so, after I add it, how do I source it? Neither
"source <file>" nor ". <file>" work.
How does the above file work... is there another... (5 Replies)
hi All, here is the problem: I'm not able to specify a PATH inside the user crontab file (/var/spool/cron/crontabs). The only syntax it accepts is the usual "* * * * * file" I'm not able to add PATH, or HOME, or MAILTO, or anything else. when I try to save the crontab, I have the error: ... (1 Reply)
Hello Folks,
I want to append a path in user's PATH variable which should be available in current session.
Background
Numerous persons will run a utility.
Aim is to add the absolute path of the utility the first time it runs so that next runs have the PATH in env & users can directly run... (6 Replies)
hi
i am new to unix and i have abig task. i have to \run particular commands having root privileges from a non root user. i know sudo is one of the way but i need sum other approach kindly help
Thanks (5 Replies)
Hi All
I have written one shell script for GPRS route add is given below named GPRSRouteSet.sh
URL="www.google.com"
VBURL="10.5.2.211"
echo "Setting route for $URL for GPRS"
URL_Address=`nslookup $URL|grep Address:|grep -v "#"|awk -F " " '{print $2}'|head -1`
echo "Executing ... (3 Replies)
Hi:
I have a requirement as below:
I have some standard Unix commands modified and kept them in a directory say /usr/clsh/bin. For example I have a script named "ls" kept here which is modified version of "ls" (say it always gives long listing i.e. ls -l).
When any user logs on and types... (2 Replies)
i mistyped the location of bash and now i can't login as the only other user who belongs to wheel on my freebsd box.
since i'm having many problems with samba, this has frozen my attempts to get things resolved with the former issue.
i've been told that 'su -m' should do the trick, but it's... (3 Replies)