Installing ports with portsnap??

I am trying to download and install ports.tar.gz. A tutorial told me to do this but the command isn't working for me. I'm sure it's a noob question but I'm noob at FreeBSD for the most part :) ..sorry.

This is what I get:

295b8er.jpg


My best guess is that this is not FreeBSD :D ...if so, how do I get into it?
 
What is the output of [cmd=]uname -a[/cmd]
?

Portsnap wasn't part of the base system until FreeBSD 6.3 (IIRC).
 
While you're at it, disable the ability for root to login via ssh. It's not at all secure.
Login using your own user account and use security/sudo or su(1).
 
Do you have any recommendation for a bourne compatible shell other than bash?

(And why does FreeBSD default to tcsh for root :OOO)
 
1) mksh is nice, others will advise e.g. zsh
2) leave root shell alone, use toor account for alternative shell
 
If OP doesn't show up here anymore I might as well delete this thread ..
 
Why is bash shell not recommended for root? Just asking because Linux users are happy with that, and I have .bashrc already sorted for root use.
 
BASH is installed as /usr/local/bin/bash. /usr/local may not be accessible during a single-user boot, or a repair boot, or when you need to login as root before all filesystems are mounted.

TCSH is installed as /bin/tcsh. /bin is always part of / (just a directory, not a filesystem), thus it's always available.

Besides, you really shouldn't be logged in as root long enough to require all the features of bash. If you find yourself logged in as root and missing bash, you need to take a step back and take another look at what you are doing, and investigate things like su, sudo, MAC, the operator group, etc.
 
There's very little you have to do as root directly if you set up sudo properly and you can use the shell of your choise on your regular user account and don't have use (t)csh at all.
 
And there's always the toor account as an alternative root account with a non-standard shell.
 
If your system gets compromised with root shell turned on in ssh you just gave the miscreants the super user account.
 
Just for future reference, here's what I do on multiple machines if I want bash:

Code:
cat >> ~/.shrc <<EOF
if [ -x /usr/local/bin/bash ]; then
    /usr/local/bin/bash -c true && exec /usr/local/bin/bash
fi
EOF

I realize it might seem excessive, but here's a breakdown:

NOTE: $- maps to the flags passed to bash/sh. -i is passed with interactive logins (and that's the only case I want to deal with in an interactive shell), and it would be present in the string, so I could check like so:

Code:
case "$-" in
*i*)
    echo "hello interactive user"
    ;;
esac

However, .shrc isn't executed unless it's an interactive login, so this is moot. It's a better check than looking for PS1, etc (that's another method, but it's more faulty). See sh(1) for more details on this.

1.
Code:
[ -x /usr/local/bin/bash ]
checks to make sure that the shell is present (this would fail most of the time in single-user mode).
2.
Code:
/usr/local/bin/bash -c true
checks to make sure that the shell isn't broken; this is to avoid the case where I do a port upgrade and break bash by accident -- I can still login with my non-privileged account via ssh.

With recent copies of CURRENT though (circa May/June?) I don't need to install bash though because sh(1) functions `properly' with history input, tab completion, etc thanks to jilles@ work in porting bits over from NetBSD..
 
Back
Top