fatman
June 29th, 2004, 23:08
I know this is a common problem, but I can't seem to find a simple solution..
I just installed OpenBSD 3.5 for the first time last night. I've had a little exposure to FreeBSD but a job that I'm intersted in uses OBSD so I figured I'd dive in at home.
BUT... whenever I try to use the backspace, delete, up/down/left/right arrow, Ctrl+C/Z keys I get random characters. In the case of the backspace key, I get "^H" and delete yeilds "^?". The arrow keys all produce "^[" while Ctrl+C gives "^C" and moves to the next line.
The problem follows me no matter whether I'm at the attached keyboard or SSH'd in. It also doesn't seem to matter what user is logged in as it follows my "root" user (though that one's been renamed) and all my regular users.
I found a link via google about remapping the keyboard but it actually had me more confused than when I started.
I'm currently using the sh shell and will not be using X for anything. Whe logging in, I just select the basic vt100 terminal.
Any suggestions or links? Anything basic would be a great help since I've never had to deal with this before.
TIA!
elmore
June 30th, 2004, 02:57
stty erase ^H
at the command line will get around that, you can also map other keys similar. If I may suggest though, I'd install a useable shell for administration (tcsh, bash, ksh) configuring sudo (/etc/sudoers) and adding a proper operator account. :)
fatman
July 1st, 2004, 00:50
If I may suggest though, I'd install a useable shell for administration (tcsh, bash, ksh) configuring sudo (/etc/sudoers) and adding a proper operator account. :)
Sure, I'm open to just about any suggestion from an OBSD user at this point. My experience is so limited its crazy...
Of the shells you listed, which would you suggest (keeping in mind my n00b'ness)?
Also, when you said to configure a proper operator account, what did you mean? I mainly gave root a new name just to do it.. no real reason for the change. :D
Anyway, thanks for the suggestions and I'll try the tty stuff.
elmore
July 1st, 2004, 05:02
I wouldn't rename the root account I personally think that's just asking for trouble. Setup an account for yourself and assign it to the appropriate groups in/etc/group. It's generally considered bad form and bad practice to rename and/or work under the root account for routine things. In particular because you are a n00b.
For instance setup user fatman use the adduser program to add this account then edit the group account and assign yourself to staff operator and wheel for instance. Then edit /etc/sudoers to allow members of the wheel group to use sudo (I believe all you have to do is uncomment a line to do that).
From there when you need to execute a command with privs. just typ 'sudo command'
and you're off to the races. I know strog is a big sudo guy, it'd be cool if he did a nice write-up and highlighted some basic and advanced configurations and features.
dkaplowitz
July 1st, 2004, 09:55
Your complaint is about csh which is the default root shell in OpenBSD more out of tradition than for any real reason. Ksh is installed by default in OBSD as an alternative, as is a limited version of tcsh. So you don't have to install anything to use another shell that supports the features you want. Bash and zsh are in /usr/ports/shells/ (take your pick of which version you want, there's usu. a devel. version and a stable version of each).
It's easy to change your root user's shell to ksh by either using the "chsh" command (make sure you use the correct absolute path to ksh, or you're hosed and will have to boot into single user to change it), or by editing /etc/passwd to reflect root's new shell. Some people advise against changing root's shell at all. I would advise you to to only change it to one of the statically compiled shells that comes with the system (so you won't need /usr mounted to get to your shell if you get into trouble) --and I'd advise using ksh over tcsh, but that's preference. And like previous posters have mentioned, get in the habit of using "sudo" to enter commands that require administrator priveleges....even if your sudo policy allows full access to all commands (not a good security practice), it's still better than logging in as root all the time.
You'll want to add yourself to the "wheel" group to use sudo, and then (as root) do "visudo" to edit (in vi) who can and can't use "sudo" and which commands they can run.
Kernel_Killer
July 1st, 2004, 20:23
Speaking of this ongoing problem that happens to every system it seems.... what's the best way to make it stick? For some reason typing it in every time a new term is opened just doesn't sound appealing. :scrambles
cod3fr3ak
July 6th, 2004, 12:55
Use /sbin/sh for root's shell?
schotty
July 6th, 2004, 21:39
Well, I have been a bash fan for years now. I grab that rather quickly from ports, or ftp its package. The method depends on the timeframe I am sitting on.
elmore
July 7th, 2004, 01:40
you can edit the .profile and add it in roots home