Setting PATH enviroment

I am about to make an idiot of myself, but I can not make a change to the PATH

System:
Code:
Copyright (c) 1992-2011 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
        The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 8.2-RELEASE #0: Thu Feb 17 02:41:51 UTC 2011
    [email]root@mason.cse.buffalo.edu[/email]:/usr/obj/usr/src/sys/GENERIC amd64
Timecounter "i8254" frequency 1193182 Hz quality 0
CPU: AMD Athlon(tm) 64 Processor 3500+ (2210.20-MHz K8-class CPU)
  Origin = "AuthenticAMD"  Id = 0xf7a  Family = f  Model = 7  Stepping = 10
  Features=0x78bfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,MMX,
FXSR,SSE,SSE2>
  AMD Features=0xe0500800<SYSCALL,NX,MMX+,LM,3DNow!+,3DNow!>
real memory  = 3221225472 (3072 MB)
avail memory = 3041722368 (2900 MB)

Current PATH is
Code:
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin:/root/bin

I need to add
Code:
/usr/local/samba/sbin[/CMD] and [CMD="code"]/usr/local/samba/bin

So using the following
Code:
Prometheus# set PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/samba/sbin:/usr/local/samba/bin:
/usr/local/bin:/root/bin

When I execute the command it appears to work. However looking at the PATH it has not changed. I have logged off and logged back on, rebooted the system and the result is the same. The PATH is not set. This is not rocket science so it has to be me. What am I doing wrong?

Keith
 
It depends on the shell. For (t)csh it would be:
[cmd=]set path = (/sbin /bin /usr/sbin /usr/bin)[/cmd]

See for example ~/.cshrc.
 
SirDice said:
It depends on the shell. For (t)csh it would be:
[cmd=]set path = (/sbin /bin /usr/sbin /usr/bin)[/cmd]

See for example ~/.cshrc.
I tried that format with the same results. I also found where you can use the .cshrc. That works for my home directory. I wanted to add the previous comments to my post, but it takes several hours for my post to appear and I am not allowd to edit it. You got to me before I could add another post. Sorry! How can you edit the ~/.cshrc. when you are using root when there is no /home/root that is accessible?
Code:
Prometheus# pwd
/home
Prometheus# ls -al
total 8
drwxr-xr-x   4 root   wheel      512 Sep  5 18:44 .
drwxr-xr-x  29 root   wheel     1024 Sep  6 17:28 ..
drwxrwxr-x   2 root   operator   512 Aug 24 08:40 .snap
drwxr-xr-x   2 Keith  wheel      512 Aug 24 08:47 Keith
Prometheus# cd /home/root
/home/root: No such file or directory.
Prometheus#
Prometheus# cd root
root: No such file or directory.
Prometheus#
Do I need to create one? If so how when I don't have a home directory for root that I can get at? I have changed the path in the past and I don't remember having any problems. I had a meltdown of my hard drive and decided instead of restoring the FreeBSD version 6.2 that I had was to install the latest operating system. There was another forum that I used on occasions that had disappeared and along with it a wealth of information. Sorry for my ignorance, but I am pulling my hair out over this one.

Keith
 
Root's home directory is /root/ (it needs to be accessible in single user mode). See /etc/passwd.
 
SirDice said:
Root's home directory is /root/ (it needs to be accessible in single user mode). See /etc/passwd.
That worked after I changed .cshrc. I never had to do that in the past. Thanks for the help.

Keith
 
Back
Top