Re: /etc default dir and file permissions.
http://www.openbsd.org/faq/faq5.html#Hierarchy On 1/28/06, James Strandboge <[EMAIL PROTECTED]> wrote: > > On Sat, 2006-01-28 at 06:30 -0800, Anon Y. Mous wrote: > > > How do I restore the default permissions for /etc > > (and any) directory on > > my hdd? > > See the manpage for mtree(8) and /etc/security for the automatic mtree > checks. mtree can even do the changes automatically. > > -- > James Strandboge > [EMAIL PROTECTED]
Re: /etc default dir and file permissions.
On Sat, 28 Jan 2006, Anon Y. Mous wrote: I accidentally chmodded my entire /etc/ dir to mode 0777. One possible solution might be to obtain etc38.tgz from FTP site and extract it to some directory (not root /). Then obtain GNU coreutils and use gnu-chmod and its reference option, from the manual: --reference=RFILE use RFILE's mode instead of MODE values This way you would not have to merge any changes, on the other hand this requires compilation of at least the gnu-chmod so mtree might be the best solution as James Strandboge suggested. -- Antti Harri
Re: /etc default dir and file permissions.
On Sat, 2006-01-28 at 06:30 -0800, Anon Y. Mous wrote: > How do I restore the default permissions for /etc > (and any) directory on > my hdd? See the manpage for mtree(8) and /etc/security for the automatic mtree checks. mtree can even do the changes automatically. -- James Strandboge [EMAIL PROTECTED]
Re: /etc default dir and file permissions.
Not sure if there's a more formal way of doing this but this works... Boot single user again, obtain the etc38.tgz distribution archive and from the root of the file system extract it as follows.. tar -zxpf etc38.tgz Take note, this archive also contains seeded directories for /var and /root though and will overwrite settings that you have changed in those (you may want to tar -ztf and browse what it contains first). Also if you have X installed then xetc38.tgz will be needed too (carried /etc/X11 and so on) Hope this helps, - Andy -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Anon Y. Mous Sent: 28 January 2006 14:30 To: misc@openbsd.org Subject: /etc default dir and file permissions. 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? Here is my complete dmesg: OpenBSD 3.8 (GENERIC) #138: Sat Sep 10 15:41:37 MDT 2005 [EMAIL PROTECTED]:/usr/src/sys/arch/i386/compile/GENERIC cpu0: Intel Celeron ("GenuineIntel" 686-class, 128KB L2 cache) 332 MHz cpu0: FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,MMX,FXSR real mem = 133787648 (130652K) avail mem = 115462144 (112756K) using 1658 buffers containing 6791168 bytes (6632K) of memory mainbus0 (root) bios0 at mainbus0: AT/286+(29) BIOS, date 08/27/98, BIOS32 rev. 0 @ 0xfd7b0 apm0 at bios0: Power Management spec V1.2 apm0: AC on, battery charge unknown apm0: flags 30102 dobusy 0 doidle 1 pcibios0 at bios0: rev 2.1 @ 0xfd7b0/0x850 pcibios0: PCI IRQ Routing Table rev 1.0 @ 0xfdf40/160 (8 entries) pcibios0: PCI Interrupt Router at 000:07:0 ("Intel 82371FB ISA" rev 0x00) pcibios0: PCI bus #1 is the last bus bios0: ROM list: 0xc/0x8000 0xe/0x4000! 0xe4000/0xc000 cpu0 at mainbus0 pci0 at mainbus0 bus 0: configuration mode 1 (no bios) pchb0 at pci0 dev 0 function 0 "Intel 82443LX AGP" rev 0x03 ppb0 at pci0 dev 1 function 0 "Intel 82443LX AGP" rev 0x03 pci1 at ppb0 bus 1 vga1 at pci1 dev 0 function 0 "ATI Rage Pro" rev 0x5c wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation) wsdisplay0: screen 1-5 added (80x25, vt100 emulation) pcib0 at pci0 dev 7 function 0 "Intel 82371AB PIIX4 ISA" rev 0x02 pciide0 at pci0 dev 7 function 1 "Intel 82371AB IDE" rev 0x01: DMA, channel 0 wired to compatibility, channel 1 wired to compatibility wd0 at pciide0 channel 0 drive 0: wd0: 16-sector PIO, LBA48, 286168MB, 586072368 sectors wd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 2 atapiscsi0 at pciide0 channel 1 drive 0 scsibus0 at atapiscsi0: 2 targets cd0 at scsibus0 targ 0 lun 0: SCSI0 5/cdrom removable cd0(pciide0:1:0): using PIO mode 4, DMA mode 2 uhci0 at pci0 dev 7 function 2 "Intel 82371AB USB" rev 0x01: irq 9 usb0 at uhci0: USB revision 1.0 uhub0 at usb0 uhub0: Intel UHCI root hub, rev 1.00/1.00, addr 1 uhub0: 2 ports with 2 removable, self powered "Intel 82371AB Power" rev 0x02 at pci0 dev 7 function 3 not configured eap0 at pci0 dev 12 function 0 "Ensoniq AudioPCI97" rev 0x02: irq 10 ac97: codec id 0x43525903 (Cirrus Logic CS4297 rev 3) ac97: codec features headphone, 18 bit DAC, 18 bit ADC, No 3D Stereo audio0 at eap0 midi0 at eap0: "Creative Labs SoundBlaster Audigy LS" rev 0x00 at pci0 dev 13 function 0 not configured vendor "Creative Labs", unknown product 0x7005 (class input subclass miscellaneous, rev 0x00) at pci0 dev 13 function 1 not configured "Nvidia Riva TNT" rev 0x04 at pci0 dev 14 function 0 not configured isa0 at pcib0 isadma0 at isa0 pckbc0 at isa0 port 0x60/5 pckbd0 at pckbc0 (kbd slot) pckbc0: using irq 1 for kbd slot wskbd0 at pckbd0: console keyboard, using wsdisplay0 ep0: irq 10 already in use pcppi0 at isa0 port 0x61 midi1 at pcppi0: spkr0 at pcppi0 sysbeep0 at pcppi0 lpt0 at isa0 port 0x378/4 irq 7 npx0 at isa0 port 0xf0/16: using exception 16 pccom0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo isapnp0 at isa0 port 0x279: read port 0x20b ep1 at isapnp0 "3Com 3C509B EtherLink III, TCM5095, PNP80F7, " port 0x210/16 irq 3: address 00:10:4b:20:fd:bd, utp (default utp) biomask fb65 netmask fb6d ttymask fbef pctr: 686-class user-level performance counters enabled mtrr: Pentium Pro MTRR support uhidev0 at uhub0 port 2 configuration 1 interface 0 uhidev0: Logitech USB-PS/2 Optical Mouse, rev 2.00/20.00, addr 2, iclass 3/1 ums0 at uhidev0: 3 buttons and Z dir. wsmouse0 at ums0 mux 0 dkcsum: wd0 matches BIOS drive 0x80 roo
Re: /etc default dir and file permissions.
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 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.
Re: /etc default dir and file permissions.
2006/1/28, Anon Y. Mous <[EMAIL PROTECTED]>: > How do I restore the default permissions for /etc $ ls -ald /etc/ drwxr-xr-x 22 root wheel 2560 Dec 12 13:58 /etc/ And I don't think this question needed a dmesg ;-) -- No virus was found in this outgoing message as I didn't bother looking. This is not an automated signature. I type this in to the bottom of every message.
/etc default dir and file permissions.
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? Here is my complete dmesg: OpenBSD 3.8 (GENERIC) #138: Sat Sep 10 15:41:37 MDT 2005 [EMAIL PROTECTED]:/usr/src/sys/arch/i386/compile/GENERIC cpu0: Intel Celeron ("GenuineIntel" 686-class, 128KB L2 cache) 332 MHz cpu0: FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,MMX,FXSR real mem = 133787648 (130652K) avail mem = 115462144 (112756K) using 1658 buffers containing 6791168 bytes (6632K) of memory mainbus0 (root) bios0 at mainbus0: AT/286+(29) BIOS, date 08/27/98, BIOS32 rev. 0 @ 0xfd7b0 apm0 at bios0: Power Management spec V1.2 apm0: AC on, battery charge unknown apm0: flags 30102 dobusy 0 doidle 1 pcibios0 at bios0: rev 2.1 @ 0xfd7b0/0x850 pcibios0: PCI IRQ Routing Table rev 1.0 @ 0xfdf40/160 (8 entries) pcibios0: PCI Interrupt Router at 000:07:0 ("Intel 82371FB ISA" rev 0x00) pcibios0: PCI bus #1 is the last bus bios0: ROM list: 0xc/0x8000 0xe/0x4000! 0xe4000/0xc000 cpu0 at mainbus0 pci0 at mainbus0 bus 0: configuration mode 1 (no bios) pchb0 at pci0 dev 0 function 0 "Intel 82443LX AGP" rev 0x03 ppb0 at pci0 dev 1 function 0 "Intel 82443LX AGP" rev 0x03 pci1 at ppb0 bus 1 vga1 at pci1 dev 0 function 0 "ATI Rage Pro" rev 0x5c wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation) wsdisplay0: screen 1-5 added (80x25, vt100 emulation) pcib0 at pci0 dev 7 function 0 "Intel 82371AB PIIX4 ISA" rev 0x02 pciide0 at pci0 dev 7 function 1 "Intel 82371AB IDE" rev 0x01: DMA, channel 0 wired to compatibility, channel 1 wired to compatibility wd0 at pciide0 channel 0 drive 0: wd0: 16-sector PIO, LBA48, 286168MB, 586072368 sectors wd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 2 atapiscsi0 at pciide0 channel 1 drive 0 scsibus0 at atapiscsi0: 2 targets cd0 at scsibus0 targ 0 lun 0: SCSI0 5/cdrom removable cd0(pciide0:1:0): using PIO mode 4, DMA mode 2 uhci0 at pci0 dev 7 function 2 "Intel 82371AB USB" rev 0x01: irq 9 usb0 at uhci0: USB revision 1.0 uhub0 at usb0 uhub0: Intel UHCI root hub, rev 1.00/1.00, addr 1 uhub0: 2 ports with 2 removable, self powered "Intel 82371AB Power" rev 0x02 at pci0 dev 7 function 3 not configured eap0 at pci0 dev 12 function 0 "Ensoniq AudioPCI97" rev 0x02: irq 10 ac97: codec id 0x43525903 (Cirrus Logic CS4297 rev 3) ac97: codec features headphone, 18 bit DAC, 18 bit ADC, No 3D Stereo audio0 at eap0 midi0 at eap0: "Creative Labs SoundBlaster Audigy LS" rev 0x00 at pci0 dev 13 function 0 not configured vendor "Creative Labs", unknown product 0x7005 (class input subclass miscellaneous, rev 0x00) at pci0 dev 13 function 1 not configured "Nvidia Riva TNT" rev 0x04 at pci0 dev 14 function 0 not configured isa0 at pcib0 isadma0 at isa0 pckbc0 at isa0 port 0x60/5 pckbd0 at pckbc0 (kbd slot) pckbc0: using irq 1 for kbd slot wskbd0 at pckbd0: console keyboard, using wsdisplay0 ep0: irq 10 already in use pcppi0 at isa0 port 0x61 midi1 at pcppi0: spkr0 at pcppi0 sysbeep0 at pcppi0 lpt0 at isa0 port 0x378/4 irq 7 npx0 at isa0 port 0xf0/16: using exception 16 pccom0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo isapnp0 at isa0 port 0x279: read port 0x20b ep1 at isapnp0 "3Com 3C509B EtherLink III, TCM5095, PNP80F7, " port 0x210/16 irq 3: address 00:10:4b:20:fd:bd, utp (default utp) biomask fb65 netmask fb6d ttymask fbef pctr: 686-class user-level performance counters enabled mtrr: Pentium Pro MTRR support uhidev0 at uhub0 port 2 configuration 1 interface 0 uhidev0: Logitech USB-PS/2 Optical Mouse, rev 2.00/20.00, addr 2, iclass 3/1 ums0 at uhidev0: 3 buttons and Z dir. wsmouse0 at ums0 mux 0 dkcsum: wd0 matches BIOS drive 0x80 root on wd0a rootdev=0x0 rrootdev=0x300 rawdev=0x302 END Thanks, minsai [EMAIL PROTECTED] Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com