DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD Security

OpenBSD Security Functionally paranoid!

Reply
 
Thread Tools Display Modes
Old 18th May 2019
hitest's Avatar
hitest hitest is offline
Real Name: George Nielsen
VPN Cryptographer
 
Join Date: Sep 2008
Location: B.C., Canada
Posts: 374
Default

Quote:
Originally Posted by TheTKS View Post
And like hitest, it may be time for me to use vi enough to actually learn it, even if I now better know how to use nano.
TKS
Interesting morning. Ran a little experiment and re-installed an OpenBSD 6.5 system and forced myself to mostly use vi for initial set-up. I did some reading yesterday to re-familiarize myself with basic usage of vi (command and insert modes, and how to save). I was able to successfully use vi to edit pf.conf, create a new doas.conf file, and create a new /etc/hostname.iwn0 file.
I still do like to use sudo occasionally, but , ran into trouble trying to edit my existing /etc/sudoers file. I did what was suggested and could not save the file?! Did the remaining files with nano. That was odd. I have more to learn about vi. Enjoyable and frustrating.

Addition: Spent the afternoon and evening tinkering with vi. I am a bit more comfortable with vi.
__________________
hitest

Last edited by hitest; 19th May 2019 at 04:19 AM. Reason: Addition- added hours later
Reply With Quote
Old 21st May 2019
jmccue jmccue is offline
Real Name: John McCue
Package Pilot
 
Join Date: Aug 2012
Location: here
Posts: 170
Default

Hi

Did not see this link (flak.tedunangst.com) in the tread, but I found it very informative

John

Last edited by jmccue; 21st May 2019 at 10:12 PM. Reason: grammer
Reply With Quote
Old 3rd June 2019
braveheart braveheart is offline
New User
 
Join Date: May 2019
Posts: 2
Default

I use the ee text editor. It comes standard with FreeBSD. I know you need to installl it as a package or from the ports tree, so that ED Mastery book suggested maybe a better place to start, unless you need to use some GNU/Linux distro that doesn't have it installed by default anymore. I wish the OpenBSD communal packages came with the more advanced text editor based on ee, ie. aee or I think its xae for GUI interfaces, (its a long time since I have used FreeBSD).
As far as doas.conf is concerned, the Author inside the man page is Ted Unagast (have I spelled his name correctly?). Anyway, search for his doas pamphlet mastery webpage with Chromium, it doesn't seem to work with other web browsers, get security certificate errors with Firefox and Lynx I think. But his document is not too long but covers the essentials. Its getting a bit old, so some of the contents may need updating - ie. the OP that replied to you said you might have found a bug.

Anyway, Take Care and Happy Reading/Experimenting

BraveHeart
Reply With Quote
Old 3rd June 2019
ibara ibara is offline
OpenBSD language porter
 
Join Date: Jan 2014
Posts: 783
Default

Quote:
Originally Posted by braveheart View Post
I use the ee text editor. It comes standard with FreeBSD. I know you need to installl it as a package or from the ports tree, so that ED Mastery book suggested maybe a better place to start, unless you need to use some GNU/Linux distro that doesn't have it installed by default anymore. I wish the OpenBSD communal packages came with the more advanced text editor based on ee, ie. aee or I think its xae for GUI interfaces, (its a long time since I have used FreeBSD).
I manage the editors/ee package. I also have a (never committed) port of aee (which comes with xae). Never thought anyone would want it but I can put it in if people do.
Reply With Quote
Old 15th June 2019
johnR johnR is offline
Fdisk Soldier
 
Join Date: Nov 2017
Posts: 57
Default

Quote:
Originally Posted by hitest View Post
I still do like to use sudo occasionally, but , ran into trouble trying to edit my existing /etc/sudoers file. I did what was suggested and could not save the file?!
/etc/sudoers may have read-only permissions, in which case you'd need to add an exclamation mark to the vi :wq command to allow vi to write to the file, eg. :wq!

You should use visudo to edit the sudoers file, not plain vi.

Last edited by johnR; 15th June 2019 at 12:13 PM.
Reply With Quote
Old 15th June 2019
hitest's Avatar
hitest hitest is offline
Real Name: George Nielsen
VPN Cryptographer
 
Join Date: Sep 2008
Location: B.C., Canada
Posts: 374
Smile

Quote:
Originally Posted by johnR View Post
/etc/sudoers may have read-only permissions, in which case you'd need to add an exclamation mark to the vi :wq command to allow vi to write to the file, eg. :wq!

You should use visudo to edit the sudoers file, not plain vi.
Thank you! Yes. Noted for future reference. This experience with editing /etc/doas.conf was indeed valuable. My default editor is now vi not nano.
__________________
hitest
Reply With Quote
Old 23rd June 2019
ripe's Avatar
ripe ripe is offline
Package Pilot
 
Join Date: Feb 2013
Location: France
Posts: 175
Default

I am trying ed and I am reading Ed Mastery, I fall in love.
Reply With Quote
Old 23rd June 2019
hitest's Avatar
hitest hitest is offline
Real Name: George Nielsen
VPN Cryptographer
 
Join Date: Sep 2008
Location: B.C., Canada
Posts: 374
Smile

Quote:
Originally Posted by ripe View Post
I am trying ed and I am reading Ed Mastery, I fall in love.
I'm starting to get comfortable with simple vi commands. I had a look at the ed wikipedia entry; it appears daunting.
I'm glad that you like ed.
__________________
hitest
Reply With Quote
Old 23rd June 2019
LeFrettchen's Avatar
LeFrettchen LeFrettchen is offline
Marveled user
 
Join Date: Aug 2012
Location: France
Posts: 408
Default

vim is pretty similar to vi, and is also the default git editor when commiting...

The command
Code:
$ git commit
will launch vim
__________________
ThinkPad W500 P8700 6GB HD3650 - faultry
ThinkStation P700 2x2620v3 32GB 1050ti 3xSSD 1xHDD
Reply With Quote
Old 24th June 2019
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,983
Default

I use ed(1) for specific tasks only. I find it particularly useful for adding new line characters to markup languages such as html or xml. And I use it in situations where no other editor is available. And sometimes in scripts.

But my use excludes regular expressions. Even though there's a large chapter on the use of them in Ed Mastery, and I've gone through the exercises. Several times.

I hate regular expressions. For me, that way lies madness.
Reply With Quote
Old 24th June 2019
frcc frcc is offline
Don't Worry Be Happy!
 
Join Date: Jul 2011
Location: hot,dry,dusty,rainy,windy,straight winds, tornado,puts the fear of God in you-Texas
Posts: 335
Default

My 2 cents..........
"ed" of course has its roots based in the development of the Unix OS.

Back in the day (mid to late 80's and early 90's) it was the only way to edit what you might consider .conf or batch files on certain IBM (Tm) mainframes as used in the Nuclear Power Plant Simulation Industry.
Following a short learning curve (being a paid consultant ) I found "ed" in this particular usage an exceptional well suited tool. Since simulation involves the monitoring, calculation, display of many variables, "ed" facilitated exact methods to alter these files to inject failure of various degree affecting simulation. As stated earlier by a previous poster it allows mental concentration on a line by line basis allowing one to focus on the technical requirements of that line. Since "ed" was the only "line editor" provided on the mainframe it was the "only" game in town. Would I have preferred another editor for this purpose?, given the technology at the time probably not. And of course in the end it didn't matter as it was the only tool provided.

Today I have greatly reduced needs for editing files. Therefore I use nano daily for .conf files and geany when fooling around with "freebasic" . Since some of you have experienced problems with .conf file editing using nano I scrutinize those files closer when using nano or if I experience problems can manage them using vi or ed.

In the end what editor or processor you choose is normally driven by convenience and suitability
and of course personal choice.

Last edited by frcc; 24th June 2019 at 09:19 PM. Reason: clarify and correct
Reply With Quote
Old 24th June 2019
ripe's Avatar
ripe ripe is offline
Package Pilot
 
Join Date: Feb 2013
Location: France
Posts: 175
Default

Nice to read all this guys.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Doas.conf question staus OpenBSD General 6 8th November 2018 03:07 PM
Restrict doas.conf to syspatch only bsd007 OpenBSD Security 19 19th October 2018 01:05 AM
DOAS(1) rules jjstorm OpenBSD General 8 11th April 2016 08:09 PM
Doas has logging? cpaulette OpenBSD General 1 13th March 2016 10:24 AM
doas package Peter_APIIT OpenBSD General 2 1st November 2015 07:45 AM


All times are GMT. The time now is 04:00 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick