On Sat, Jan 28, 2006 at 06:30:19AM -0800, Anon Y. Mous wrote: > Hi: > > I am running OpenBSD 3.8/i386 on an Intel Celeron > (Mendocino) @ 300MHz w/ 128 MB RAM on a 300GB Seagate > ATA 100 IDE hdd. > > I accidentally chmodded my entire /etc/ dir to mode > 0777. > > Because I was then unable to login properly, I > changed /etc/ back to 0440, > from a single user boot (boot -s). > > Now I can't launch gtk+-based apps from my primary > non-root account, and > I cannot access commands via sudo, or read any man > pages when not logged in as root. > > How do I restore the default permissions for /etc > (and any) directory on > my hdd?
You can "restore" your /etc to 3.8-release by obtaining the etc38.tgz file from any of the ftp mirrors. Boot in single-user mode, and do something like this from your / directory: # mount -a # sh /etc/netstart # ftp <your local mirror> cd pub/OpenBSD/3.8/i386 get etc38.tgz quit # cp -R etc etc-bkup # rm -rf etc/* # chmod 755 etc # tar xpzf etc38.tgz You'll then need to manually merge your local changes from /etc-bkup to /etc.