DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD Security

OpenBSD Security Functionally paranoid!

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 2nd May 2019
kervalis kervalis is offline
New User
 
Join Date: May 2019
Posts: 1
Default removing immutable bit ??

long story short i ran 'chflags schg /etc/resolv.conf' because everytime I reset my network the file would get overwritten. probably a better way to go about this. anyway i tried to remove the immutable bit from the file with 'chflags noschg /etc/resolv.conf' but wasn't able to do so even as root. might this have to do with the security levels? i did login in single user mode but didn't have access to the chflags command.

how does one go about removing the immutable bit from a file after setting it?

thanks!
Reply With Quote
  #2   (View Single Post)  
Old 2nd May 2019
jggimi's Avatar
jggimi jggimi is online now
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 6,839
Default

Hello, and welcome!
Quote:
Originally Posted by kervalis View Post
...probably a better way to go about this.
Yes, there is. When you use DHCP, the dhclient(8) program recreates this file. You can use a resolv.conf.tail(5) file to append lines to the file whenever it is recreated, or, you can use a dhclient.conf(5) file to supersede nameserver values obtained from the DHCP server during negotiation.
Quote:
...i did login in single user mode but didn't have access to the chflags command.
chflags(1) is in /usr/bin. You'll need to mount(8) your /usr filesystem while in single-user mode. Or drop to single-user mode from multi-user mode, with shutdown(8). It leaves your mounts mounted.

Last edited by jggimi; 2nd May 2019 at 03:03 PM. Reason: added dropping from multi-user
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
removing unused system daemons from the base install (for security) puffyborg OpenBSD Security 2 24th August 2018 08:15 PM
removing unneeded (orphaned) packages .. is it possible ? daemonfowl OpenBSD Packages and Ports 2 27th March 2012 04:00 PM
Question about removing ports/packages Daffy OpenBSD Packages and Ports 2 16th October 2010 09:06 AM


All times are GMT. The time now is 10:54 AM.


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