bash can not find most of my commands

2011-02-22 Thread Alokat

Hi,

I have changed my shell from csh to bash ...
But after that I have to call reboot like /sbin/reboot.

How can I change that without changing the shell. :)

my /root/.profile:

PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin
export PATH
HOME=/root
export HOME
TERM=${TERM:-cons25}
export TERM
PAGER=more
export PAGER

Regards,
Alokat
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: bash can not find most of my commands

2011-02-22 Thread Rolf Nielsen

2011-02-22 17:40, Alokat skrev:

Hi,

I have changed my shell from csh to bash ...


Why?
Do you use root as your regular login?


But after that I have to call reboot like /sbin/reboot.

How can I change that without changing the shell. :)

my /root/.profile:

PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin

export PATH
HOME=/root
export HOME
TERM=${TERM:-cons25}
export TERM
PAGER=more
export PAGER

Regards,
Alokat
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to
freebsd-questions-unsubscr...@freebsd.org



___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: bash can not find most of my commands

2011-02-22 Thread Alokat

On 02/22/11 17:44, Rolf Nielsen wrote:

2011-02-22 17:40, Alokat skrev:

Hi,

I have changed my shell from csh to bash ...


Why?
Do you use root as your regular login?


But after that I have to call reboot like /sbin/reboot.

How can I change that without changing the shell. :)

my /root/.profile:

PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin 



export PATH
HOME=/root
export HOME
TERM=${TERM:-cons25}
export TERM
PAGER=more
export PAGER

Regards,
Alokat
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to
freebsd-questions-unsubscr...@freebsd.org



___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to 
freebsd-questions-unsubscr...@freebsd.org

It's just for example ... :)
I have a non root login for regular stuff.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: bash can not find most of my commands

2011-02-22 Thread Paul Macdonald

On 22/02/2011 16:40, Alokat wrote:

Hi,

I have changed my shell from csh to bash ...
But after that I have to call reboot like /sbin/reboot.

How can I change that without changing the shell. :)


don't change your root shell!

csh is in the base system so is safe and will always* work,

bash is a port and gets updated regularly, there's been at least one 
occasion when my bash upgrade failed and i couln't login as root.  very 
frustrating..


I just get used to changing to bash after that, much safer!

Paul.



--
-
Paul Macdonald
IFDNRG Ltd
Web and video hosting
-
t: 0131 5548070
m: 07534206249
e: p...@ifdnrg.com
w: http://www.ifdnrg.com
-
IFDNRG
40 Maritime Street
Edinburgh
EH6 6SA
-


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: bash can not find most of my commands

2011-02-22 Thread Rolf G Nielsen

2011-02-22 17:47, Alokat skrev:

On 02/22/11 17:44, Rolf Nielsen wrote:

2011-02-22 17:40, Alokat skrev:

Hi,

I have changed my shell from csh to bash ...


Why?
Do you use root as your regular login?


But after that I have to call reboot like /sbin/reboot.

How can I change that without changing the shell. :)

my /root/.profile:

PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin


export PATH
HOME=/root
export HOME
TERM=${TERM:-cons25}
export TERM
PAGER=more
export PAGER

Regards,
Alokat
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to
freebsd-questions-unsubscr...@freebsd.org



___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to
freebsd-questions-unsubscr...@freebsd.org

It's just for example ... :)
I have a non root login for regular stuff.


To me the .profile looks ok, and I can't really say why it doesn't work.
However, do not use a shell that's not in the base system for root. Some 
would point security issues, but I don't know much about those when it 
comes to bash, however, if you need to boot into single user, you may 
get into troubles with a shell not in base.



___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to
freebsd-questions-unsubscr...@freebsd.org



___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: bash can not find most of my commands

2011-02-22 Thread Alokat

On 02/22/11 17:49, Paul Macdonald wrote:

On 22/02/2011 16:40, Alokat wrote:

Hi,

I have changed my shell from csh to bash ...
But after that I have to call reboot like /sbin/reboot.

How can I change that without changing the shell. :)


don't change your root shell!

csh is in the base system so is safe and will always* work,

bash is a port and gets updated regularly, there's been at least one 
occasion when my bash upgrade failed and i couln't login as root.  
very frustrating..


I just get used to changing to bash after that, much safer!

Paul.




Paul has satisfied me. I have changed back to csh.

Thank for help.

Regards,
alokat
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: bash can not find most of my commands

2011-02-22 Thread Randy Ramsdell

Alokat wrote:

On 02/22/11 17:49, Paul Macdonald wrote:

On 22/02/2011 16:40, Alokat wrote:

Hi,

I have changed my shell from csh to bash ...
But after that I have to call reboot like /sbin/reboot.

How can I change that without changing the shell. :)


don't change your root shell!

csh is in the base system so is safe and will always* work,

bash is a port and gets updated regularly, there's been at least one 
occasion when my bash upgrade failed and i couln't login as root.  
very frustrating..


I just get used to changing to bash after that, much safer!

Paul.




Paul has satisfied me. I have changed back to csh.

Thank for help.

Regards,
alokat



And if you use bash after login or anytime, your original problem remains.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: bash can not find most of my commands

2011-02-22 Thread Jason Helfman

On Tue, Feb 22, 2011 at 12:08:30PM -0500, Randy Ramsdell thus spake:

Alokat wrote:

On 02/22/11 17:49, Paul Macdonald wrote:

On 22/02/2011 16:40, Alokat wrote:

Hi,

I have changed my shell from csh to bash ...
But after that I have to call reboot like /sbin/reboot.

How can I change that without changing the shell. :)


don't change your root shell!

csh is in the base system so is safe and will always* work,

bash is a port and gets updated regularly, there's been at least one
occasion when my bash upgrade failed and i couln't login as root.
very frustrating..

I just get used to changing to bash after that, much safer!

Paul.




Paul has satisfied me. I have changed back to csh.

Thank for help.

Regards,
alokat



And if you use bash after login or anytime, your original problem remains.


This has to do with your path, and it is known good practice to use full
paths, as well.

-jgh
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: bash can not find most of my commands

2011-02-22 Thread Lars Eighner

On Tue, 22 Feb 2011, Alokat wrote:


Paul has satisfied me. I have changed back to csh.


If you want to run as root and use bash, well, that is what the user toor is
for (examine master.passwd -- use vipw to edit master.passwd to enter a
password for toor and the path to bash for toor, but set EDITOR first if you
are not comfortable with vi).  If you activate toor, you can log in as toor,
use bash, and yet you are root (try whoami as toor).  This preserves the
root login for emergencies when /usr may not be mounted.

--
Lars Eighner
http://www.larseighner.com/index.html
8800 N IH35 APT 1191 AUSTIN TX 78753-5266

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: bash can not find most of my commands

2011-02-22 Thread Warren Block

On Tue, 22 Feb 2011, Paul Macdonald wrote:


On 22/02/2011 16:40, Alokat wrote:

Hi,

I have changed my shell from csh to bash ...
But after that I have to call reboot like /sbin/reboot.

How can I change that without changing the shell. :)


don't change your root shell!

csh is in the base system so is safe and will always* work,

bash is a port and gets updated regularly, there's been at least one occasion 
when my bash upgrade failed and i couln't login as root.  very frustrating..


I just get used to changing to bash after that, much safer!


Consider running bash from .cshrc.  Less breakable than changing root's 
shell, but still kind of automatic.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: bash can not find most of my commands

2011-02-22 Thread Chad Perrin
On Tue, Feb 22, 2011 at 05:58:22PM +0100, Alokat wrote:

 Paul has satisfied me. I have changed back to csh.

Your system should have a toor account as well.  It is just a second
root account, whose essential purpose is to provide a root account that
you can fiddle with to your heart's content without endangering the main
root account.  Note that the toor account can break things on the system
just as much as the root account; if you break the toor account itself,
though, you still have access to the main root account to get yourself
out of trouble.

Thus, if you *really* want a superuser account with bash as its default
shell, you can always use toor for that purpose.  I don't much see the
point in setting a superuser account to use bash anyway -- or any other
account, really -- but the option is there if you must have it.  Just
don't change the shell for the root account itself that way; it's bad for
you, with lots of fatty calories, preservatives, artificial sweeteners,
and other stuff your body should not be ingesting on a regular basis.

-- 
Chad Perrin [ original content licensed OWL: http://owl.apotheon.org ]


pgpQg5oXnDcAV.pgp
Description: PGP signature


Re: bash can not find most of my commands

2011-02-22 Thread David Brodbeck
On Tue, Feb 22, 2011 at 9:53 AM, Chad Perrin per...@apotheon.com wrote:
 Thus, if you *really* want a superuser account with bash as its default
 shell, you can always use toor for that purpose.  I don't much see the
 point in setting a superuser account to use bash anyway -- or any other
 account, really -- but the option is there if you must have it.

It turns out auto-completion with hinting and command history
searching are pretty addictive if you're used to having them. :)

Personally, I usually just use sudo, or run bash as my first command
after gaining root powers.  But it's very interesting to finally find
out what toor is for.  I'd always wondered.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: bash can not find most of my commands

2011-02-22 Thread Chad Perrin
On Tue, Feb 22, 2011 at 10:07:54AM -0800, David Brodbeck wrote:
 On Tue, Feb 22, 2011 at 9:53 AM, Chad Perrin per...@apotheon.com wrote:
 
 It turns out auto-completion with hinting and command history
 searching are pretty addictive if you're used to having them. :)

I have auto-completion, and I know my environment well enough that hints
aren't generally helpful.


 
 Personally, I usually just use sudo, or run bash as my first command
 after gaining root powers.  But it's very interesting to finally find
 out what toor is for.  I'd always wondered.

Glad to be of some help.

Just do us all a favor; don't write code in bash.  Use Bourne shell (sh,
not bash), or a real programming language (Perl, Ruby, Python,
whatever).  The bash option essentially tries to capture the power of
such real languages, but does a very bad job of it -- and gives up the
nigh-universal portability across Unix-like systems to do so.  It's the
worst of all worlds.

-- 
Chad Perrin [ original content licensed OWL: http://owl.apotheon.org ]


pgpwBJdOKArNp.pgp
Description: PGP signature


Re: bash can not find most of my commands

2011-02-22 Thread David Brodbeck
On Tue, Feb 22, 2011 at 12:39 PM, Chad Perrin per...@apotheon.com wrote:
 Just do us all a favor; don't write code in bash.

Yeah, I try to avoid bash-specific syntax unless it's for one-off
scripts.  csh suffers the same kinds of problems; I only write csh
code under extreme duress, like when forced to maintain the
system-wide csh.login script. ;)
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: bash can not find most of my commands

2011-02-22 Thread Chad Perrin
On Tue, Feb 22, 2011 at 01:10:20PM -0800, David Brodbeck wrote:
 
 Yeah, I try to avoid bash-specific syntax unless it's for one-off
 scripts.  csh suffers the same kinds of problems; I only write csh
 code under extreme duress, like when forced to maintain the
 system-wide csh.login script. ;)

I often use tcsh as an interactive shell, but I do not use it for shell
scripts.

-- 
Chad Perrin [ original content licensed OWL: http://owl.apotheon.org ]


pgpW4w3idg6aw.pgp
Description: PGP signature


Re: bash can not find most of my commands

2011-02-22 Thread Chip Camden
Quoth David Brodbeck on Tuesday, 22 February 2011:
 On Tue, Feb 22, 2011 at 12:39 PM, Chad Perrin per...@apotheon.com wrote:
  Just do us all a favor; don't write code in bash.

What's with all the bash bashing?

Sorry, couldn't resist.

 
 Yeah, I try to avoid bash-specific syntax unless it's for one-off
 scripts.  csh suffers the same kinds of problems; I only write csh
 code under extreme duress, like when forced to maintain the
 system-wide csh.login script. ;)

At least sh scripts will execute correctly under bash -- they don't
always under csh/tcsh.

I like zsh for a command-line shell, but when writing scripts for general
usage I stick with the sh-compatibile subset of capabilities, and I enforce
that on myself with the #!/bin/sh shebang.  If I need more than what that
can gracefully do, I usually run to the arms of Ruby.

-- 
Sterling (Chip) Camden | sterl...@camdensoftware.com | 2048D/3A978E4F
http://chipsquips.com  | http://camdensoftware.com   | http://chipstips.com


pgpISYvMSTcjg.pgp
Description: PGP signature