Safe way to edit system configuration files?

What is a safe way to edit a system configuration file? I mean I did this twice: I edited rc.conf, rebooted and the system failed to boot. Then I had to edit out the typos with a LiveCD.
Is there like a visudo (that edits /etc/sudoers) for rc.conf, xorg.conf, fstab and so on?
Thanks!

Majorix wrote:
No I am of course editing those files with sudo. But the problem is, gedit won't check the file for possible errors, thus if you too oversee it and try to reboot using those system files, you will fail.
visudo checks you while you edit, so if you make an error it will warn you in the end.
I was asking if there was a similar tool for the rest of the configuration files.
Sorry for not being clear.
Oh -- a kind of a babysitter, you mean?
j/k, i screw up config files all the time.
No, as far as I know there is nothing like that for most files. some do have functionality like that, like I think lilo warns you when you write to lilo.conf and the file has errors. and you can run something like testparm for the smb.conf file, and I think there something similar to check apache config files, etc. but for the standard system config files or arch-specific files like rc.conf, fstab, etc. I don't think there is anything. you just have to be sure not to make any mistakes!

Similar Messages

  • Is down loading projects to DVD's a safe way to edit and save?

    Yesterday I posted "Is down loading projects to DVD's a safe way to edit and save?". It got deleted. Being a newbe I got it in the wrong forum. I got it in "Post New Thread in Forum Comments". I was asked what path I used; I opened the home page. I ticked Discussions / Start New Discussion. I was so baited by the lure to post, I did not see the small "Adobe Forums" at the top and bottom of the page. I also did not understand the large "Post New Tread in Forum Comments". It was a bit confusing to me. But thanks to you guys I see the light.
    I read the discussion I started in "Why do we keep moving Post?". I was branded as a lost soul. I want to thank all of you for helping find my way. No one was rude or even harsh. I have been on other Forums and if you make a mistake you get blasted.
    I also want to thank you for all the answers I got for my original post. I read up on SATA and I can see that is where I need to make some changes to my portioned HD. I am sure I will be leaning on you for a lot of help for such a "Lost soul". And that I am. I am your typical 61 year old who got started late on computers.
    The fact that my HD is portioned is not a good thing I learned. I am not sure if my computer has the Power Supply or the Mother Board to convert to SATA. My question is: Will eSATA work in place of the internal SATA?
    Will I need two; one for editing and one for storage.
    I have an outboard I Omega with about 650GB, I think. Not sure if it is SATA, but it has worked well for my backup videos and general files.
    Thanks Again and I hope I got it right this time.
    I'm timid about ticking the "Post Message" , but here goes......Ohhhhhhhhh.....

    The system process in control panel MAY give you some of that information
    It should ALL be available with the information the system builder gave you... he DID give you the paperwork that came with the individual components?
    Taking the side panel off the case and looking inside with a flashlight might also help... but, of course, you'll need to know what it is you are seeing, and it sounds like you don't know much about hardware, so that may not help much
    Sadly, if the person who built this "video editing" computer didn't really understand video editing, you are left with a computer that won't do what you want, and no easy way to make it work
    You may need to find a computer shop to do this for you... and make sure part of their price is giving you a written list of everything you HAVE and everything they DO in the way of additions or configuration changes

  • Was advised to delete system configuration file from hard drive and now computer will not start - any help would be appreciated.

    Downloaded Yosemite and since then cannot connect to internet or bluetooth mouse - was advised to delete system configuration file from the hard drive and since then cannot start up computer. Any help would be appreciated - cheers.

    Boot the MBP with the OPTION+COMMAND+R keys down.  The result should be a display showing a revolving globe.  By following the instructions, you will be able to reinstall the original OSX.  Then you may reinstall Yosemite.
    A solid Internet connection will be required.
    Ciao.

  • Is there a way to edit a PDF file without converting it into a word document?

    Is there a way to edit a PDF file without converting it into a word document?

    Then you posted in the wrong forum...
    At any rate, you can use the Edit Text & Images tool (under Tools - Content Editing) to make changes to the file. You'll need to be a bit more specific about what you want to change if you want more detailed instructions.

  • RV220W - DHCPv6 Prefix Delegation - Edit the configuration file?

    I am trying to configure this router to obtain an IPv6 address from my ISP who offers a dual stack IPv4/IPv6 DHCPv6 Prefix Delegation service.
    I did a WAN packet capture to see the type of DHCPv6 packets the router sends to the ISP in order to obtain an IPv6 address and I saw that the router is sending DHCPv6 solicitation packets of type IA_NA i.e. for Identity Association for Non-temporary Address. However, most ISPs that offer a dual stack IP4/IPv6 service, they use DHCPv6 Prefix Delegation in which case the router is expected to send DHCPv6 solicitation packets of type IA_PD i.e. for Identity Association for Prefix Delegation.
    I then downloaded its configuration file and saw the following:
    dhcpv6c = {}
    dhcpv6c[1] = {}
    dhcpv6c[1]["renewTime"] = "3600"
    dhcpv6c[1]["statelessMode"] = "1"
    dhcpv6c[1]["prefixDelegation"] = "0"
    dhcpv6c[1]["preferredAddress"] = ""
    dhcpv6c[1]["LogicalIfName"] = "WAN1"
    dhcpv6c[1]["requestPreferredAddress"] = "0"
    dhcpv6c[1]["requestDNSSearchList"] = "0"
    dhcpv6c[1]["requestPreferredPrefix"] = "0"
    dhcpv6c[1]["preferredAddressPrefixLength"] = "0"
    dhcpv6c[1]["requestDNS"] = "1"
    dhcpv6c[1]["sendRapidCommit"] = "0"
    dhcpv6c[1]["isEnabled"] = "1"
    dhcpv6c[1]["preferredPrefix"] = ""
    dhcpv6c[1]["_ROWID_"] = "1"
    dhcpv6c[1]["preferredPrefixPrefixLength"] = "0"
    So, the option for the DHCPv6 client to perform a prefixDelegation request is disabled. Does that mean that if I set this flag to "1" it is going to work? Well, I edited the configuration file and changed this flag but the router refuses to load it! It complains about the file being changed. How does it know that? Is it computing some type of checksum? Does anyone know how can I manually edit this flag and update the router's configuration?

    I can't help you because our ISP doesn't support native ipv6.  I suggest you call Cisco Small Business technical support.  All you need is your serial number and your Cisco username to get support.  Tori is awesome to work with.

  • I deleted the System Configuration files and now my WiFi won't work.

    I've always loved Apple but ever since I upgraded to Yosemite I've been having problems with my WiFi connection, it kept dropping. So I decided to look for a solution and I found some forums that said I should go to System Configuration on Finder (Cmd+Shift+G on Finder, then write /Library/Preferences/SystemConfiguration) and that I should delete all the files there. I did just that and now I can't get online at all. Then I read in some other forums that you should only delete certain files... So you can imagine my face when I read that. I tried taking the files I deleted out of the Trash and everything but I still can't connect to the Internet wirelessly. I'm desperate!
    My wireless connection used to drop every 2 minutes, and I had to go to Network Preferences, Assistant, Diagnostic, and that would fix it for another 5 minutes, 10 if I was lucky. But now I can't get online at all. I've tried everything I could think of and nothing.
    I don't care if my Internet drops anymore, I just want it to go back to the way it was. I'm traveling to Argentina in a week and I need this fixed!!
    If anyone can help me I would really appreciate it.

    The following support article is somewhat outdated. Where it refers to booting from an installation disc, you should boot into Recovery (if running 10.7 or later) by holding down the key combination command-R at the chime. If your startup volume is encrypted with FileVault, you’ll have to unlock it in Disk Utility before you can do anything with it.
    Mac OS X: Gray screen appears during startup

  • How do you edit system plist files manually?

    I'm trying to edit a .plist file in the system/library/launchdaemons folder but can't figure out how to get permissions to work.  I have Xcode but when I try to edit it says "you don't own parent folder, can't unlock".  I tried changing ownership of the .plist file itself (just temporarily) and still same error.  The permissions on the file are like all system files; owner-system-w/r, group-wheel-read, and everyone-read.  So, what's the trick?  And please don't say I shouldn't mess with system files...if I brick the computer I promise not to ask for your help.  Thanks.

    Hi Niel,
    Can't you edit system files as root?
    Later,
    kel

  • Is there a way to edit a MPeg2 file?

    Was wondering if there is a way to use a mpeg2 file on a fcp timeline. what would be the best way to convert the mpeg2 file to a workable file that fcp4 could use but keep the quality close to the mpeg2 or better.
    Thanks,
    Al

    Building on what Drew said, Mpeg StreamClip can also trim an Mpeg2 stream into smaller sections, which can then once saved out to the hard drive, as stand alone file clips, be brought back into Mpeg stream clip, (collectively) and exported as a unified Single Mpeg2 file, minus the parts you choose not to export out as stand alone Mpeg2 files.
    The only downside to this method, is that the in and out points you choose in Mpeg StreamClip, will have to be made at the GOP boundaries, so it not frame accurate, but the quality of the Mpeg2 file you end up with is equal to the original, minus the parts you eliminate.
    Message was edited by: Mr. Kelly Freebairn

  • What is Simplest Way to Edit an MP3 File?

    I have an MP3 file of an audio stream that I recorded using Audio Hijack Pro. I have a section at the beginning that I simply want to delete completely. And I also want to break up the big MP3 into three or four individual files. What's the simplest app to use to do this? Thanks.
    Steve M.

    Well, I use DP for most of my own projects, and that (I assume along with most other DAWs these days) now allows you to directly import/edit/export MP3 data. And I used to buy 'Pro' keys for Quicktime which would then allow you to lift out selections, from any file type that QT could handle, and create a new file from that; I arrived at that solution to accomplish precisely what you're concerned with, after having tried out the various OS9/OSX freeware/shareware audio editors that wwere around at the time - if Fission had been available then in the same price range, think I'd have bought that. And I've got a couple of Windoze Freeware equivalents to Fission on my XP machines.
    But actually with reference to your context, I've been using Audio Hijack Pro to record about 12 hours of 128kbs DAB broadcasts per week for the last 3 years, and being ex IT I use a 4th gen database programming app called Omnis to manipulate my MP3 recordings via Applescript/Quicktime. Never got round to actually editing out content, which was what I'd intended (getting a bit long in the tooth for detailed programming, couldn't be bothered to gen up on the MP3 tagging), so I just maintain a database of my own 'bookmarks' for my MP3 files (now up to about 150GB of 1/2/3 hour segments !).
    G5 Dual 2.7, MacMini, iMac 700; P4/XP Desk & Lap.   Mac OS X (10.4.8)   mLan:01x/i88x; DP 5.1, Cubase SX3, NI Komplete, Melodyne.

  • System wide default configuration files?

    I have six people using the computer, and I don't want to have to configure starting Wicd in the tray for each user or font configuration...
    Is there a way to set up configuration files for new users like Ubuntu and all of the other "tweaked" distros do?

    Doesn't matter where you copy the config files from, so long as they're valid and do what you want.
    Whether configuring your user will give you ~/.config files that do what you want depends. For example, if there's an existing /etc/foo_config file, and you set up your ~/.foo_config file in a way that (whether you realize it or not) depends on the stuff in /etc/foo_config being the system default, and then you copy your ~/.foo_config file to /etc/foo_config (overwriting the old file), then no, it won't work. If you avoid mistakes like that, and end up with ~/.foo_config files that all on their own do what you want, then sure, it will work. (Just check their permissions after you copy them to /etc.)

  • Is there a way to edit vector data within a placed Ai file?

    When I place aa Ai file in InDesign it its seems to be one group and I want to take advantage of the vector content within that group. Group and Ungroup are greyed out.
    I'm using cs5.5.
    I've only been using it for 2 days and am new to InDesign.
    Any suggestions?
    Thanks.

    The way to edit an AI file is to right-click the image and select "Edit original"
    If it's just some simple objects, I find Bob's suggestion of copying them into InDesign worth the effort. Then again, if you have to edit them at a regular base, InDesign's vector editing tools are slightly less advanced than Illustrator's (admittedly, by a narrow margin; but some things are just a bit easier to do in Illustrator).

  • How do I edit the host file in ipad

    I would like to test our site and would like to point the URL to a different server. Is there a way to edit the hosts file similar to how you would do it on other computers?

    iPhoneView will let you get at your system files.
    Check out the new remodeled MacOSG website! 24-hour Apple-related news & support.
     MacOSG: An Apple User Group  iTunes: MacOSG Podcast  Follow us on Twitter: MacOSG

  • Use configuration file VIs to set AppFont in INI

    I am using the following code in an attempt to set AppFont, SystemFont, and DialogFont in an executable's .ini file all to Segoe UI 15. I was disappointed to discover that the configuration file VIs don't seem to write the key correctly. When I use this code, I get the following in the .ini file:
    AppFont = ""Segoe UI" 15"
    SystemFont = ""Segoe UI" 15"
    DialogFont = ""Segoe UI" 15"
    What I really need is:
    AppFont = "Segoe UI" 15
    SystemFont = ""Segoe UI" 15
    DialogFont = "Segoe UI" 15
    In other words, the configuration file VIs add an extra set of quotation marks. With this extra set of quotation marks, the executable ignored these settings. The "write raw string?" input didn't seem to affect this behavior. 
    Does anyone know of a way to get the configuration file VIs to write this key/value pair correctly, or do I need to write extra code to either remove the quotations or do the whole thing myself? It seems like the configuration file parsing/editing VIs that NI provides should be able to parse and edit NI-provided configuration files...

    There is no way to do this with the current config file API. That "write raw string" input only pertains to escaping certain characters. We also have an internal API for writing data specifically to the LabVIEW.ini file, but it has the same problem with extra quotes.  For now, you'll need to either refrain from using the config file VIs, or add some post-processing code to go in and remove the extra quotes.
    Darren Nattinger, CLA
    LabVIEW Artisan and Nugget Penman

  • Nano syntax highlighting: catch-all syntax for configuration files

    After years of using nano, I only recently learned that it supports syntax coloring... (Why would they turn that off by default? ) Well, I thought I'll make up for it by making extra good use of it from now on...
    Unfortunately it didn't ship a highlighting syntax for the the kind of files that I use nano the most for: system configuration files.
    So I wrote my own, and after tweaking a bit here and there whenever I encountered a config file for which the highlighting wasn't satisfactory at first, I think the result is now good enough (screenshots below) that it's worth sharing with my fellow Arch users:
    Code & Instructions:
    Here is the syntax definition:
    # config file highlighting
    syntax "conf" "(\.(conf|config|cfg|cnf|rc|lst|list|defs|ini|desktop|mime|types|preset|cache|seat|service|htaccess)$|(^|/)(\w*crontab|mirrorlist|group|hosts|passwd|rpc|netconfig|shadow|fstab|inittab|inputrc|protocols|sudoers)$|conf.d/|.config/)"
    # default text
    color magenta "^.*$"
    # special values
    icolor brightblue "(^|\s|=)(default|true|false|on|off|yes|no)(\s|$)"
    # keys
    icolor cyan "^\s*(set\s+)?[A-Z0-9_\/\.\%\@+-]+\s*([:]|\>)"
    # commands
    color blue "^\s*set\s+\<"
    # punctuation
    color blue "[.]"
    # numbers
    color red "(^|\s|[[/:|<>(){}=,]|\])[-+]?[0-9](\.?[0-9])*%?($|\>)"
    # keys
    icolor cyan "^\s*(\$if )?([A-Z0-9_\/\.\%\@+-]|\s)+="
    # punctuation
    color blue "/"
    color brightwhite "(\]|[()<>[{},;:=])"
    color brightwhite "(^|\[|\{|\:)\s*-(\s|$)"
    # section headings
    icolor brightyellow "^\s*(\[([A-Z0-9_\.-]|\s)+\])+\s*$"
    color brightcyan "^\s*((Sub)?Section\s*(=|\>)|End(Sub)?Section\s*$)"
    color brightcyan "^\s*\$(end)?if(\s|$)"
    # URLs
    icolor green "\b(([A-Z]+://|www[.])[A-Z0-9/:#?&$=_\.\-]+)(\b|$| )"
    # XML-like tags
    icolor brightcyan "</?\w+((\s*\w+\s*=)?\s*("[^"]*"|'[^']*'|!?[A-Z0-9_:/]))*(\s*/)?>"
    # strings
    color yellow "\"(\\.|[^"])*\"" "'(\\.|[^'])*'"
    # comments
    color white "#.*$"
    color blue "^\s*##.*$"
    color white "^;.*$"
    color white start="<!--" end="-->"
    To install, save the above above code snippet as a file called conf.nanorc in the folder /usr/share/nano/ (or /usr/local/share/nano/ or similar if you feel strongly about the /usr <--> /usr/local separation), and then add the following to the end of the file /etc/nanorc:
    ## Configuration files (catch-all syntax)
    include "/usr/share/nano/conf.nanorc"
    Hints:
    The colors I chose look good (imo) with the terminal background and color settings that I use, but might not look good, or even readable, with yours, so simply change the color names in the code snippet to whatever you prefer - valid color names are:
    If you use a console with white background, you'll have to change at least the white color I chose for comments and punctuation.
    The first code line in the snippet includes a regular expression that defines for which file names this syntax highlighting should be used. Whenever you encounter a config file that is not matched by this, but you would still like to open it with syntax highlighting, you can manually select this syntax with nano's -Y switch, like so:
    nano -Y conf myConfigFile
    Technical Note:
    It's implemented as a single catch-all syntax, since nano chooses which syntax to apply based on the filename, and in the case of config files usually not much can be learned about the content format from the file name extension (.conf can by anything from flat key/value tuples to XML, .ini can be the official INI format or something else, etc...).
    This means that some compromises have been made, so with this highlighting syntax probably no config file looks 100% as good as a highlighting syntax that would be specifically optimized for one kind of config format, but all in all the vast majority of config files should look pretty good.
    Screenshots:
    /etc/rc.conf,  /etc/hosts:
    /etc/pacman.conf,  /etc/group:
    xorg.conf,  some .desktop file:
    httpd.conf (Apache config),  php.ini:
    More screenshots:
    /etc/fonts/fonts.conf (uses XML)
    /etc/inittab
    /etc/fstab
    /etc/inputrc
    /etc/mime.types
    /etc/protocols
    /etc/xinetd.conf
    See Also:
    nano syntax highlighting: GNU makefiles
    Update [2012-01-28]: Made some more improvements to the syntax definition (see post)
    Last edited by sas (2012-02-01 15:26:43)

    doug piston wrote:I deal with alot of .mk files and would love to see it there.
    You mean GNU makefiles?
    I'm afraid they might be out of scope for this generic config-file syntax.
    Logically they're not system config files, and technically they're a pretty specialized and complex format (different "types" of rules, rules spanning multiple lines, rules containing arbitrary Bash code, etc.).
    This is how an .mk file currently looks with this highlighting syntax:
    $ nano -Y conf /usr/lib/httpd/build/rules.mk
    And apart from highlighting variables of the form $$abc or $(abc), I'm not sure how much can be improved here without breaking the highlighting for more conventional config files.
    It would probably be better to create a specialized highlighting syntax just for .mk files.
    EDIT: I sat down and did just that, here's the result: nano syntax highlighting: GNU makefiles, and here is how the above makefile snipped looks with it:
    Last edited by sas (2012-02-01 15:18:52)

  • How to create bulk configuration files from a template for staging?

    Hello,
    We have created a sample configuration for ISRG2 2901 Router.  The sample configuration is long, and with copy/paste it is possible to skip some lines, and it is difficult to ensure the configuration of every device is standardized due to this error possibility. What we are trying to achieve is first create a template from this sample configuration file, and then create configuration files for each device seperately and automatically. After creating this configuration instances, we want to be able to distribute the configuration files (and possibly the ios) to the devices during the staging phase. Since there are about 1000 2901 routers, creating configuration files is important?
    From searching we have found the following tools:
    1) CCE (Cisco Configuration Engine): This tool seems to be very efficient for distributing the created configuration files. We may use the serial number of the device, and it provides almost zero touch provisioning of the configuration files to the devices. Creating the configuration file from the template seems to be manual, i.e enter the ip addresses of the interfaces, the routing tables one by one for each device. How can we use velocity template for device configs?
    2) Ciscoworks LMS Prime: It is possible to create a baseline template for the devices, and after getting the backup configuration of the routers, it is possible to compare the actual configuration of the device with the baseline template, and understand if there is any difference with each other. This is indeed very useful in order to keep the configuration standardized, we again could not find a way to create bulk configuration files from the baseline template.
    3)  Solarwinds Config Generator: This tool is useful for creating a configuration file from a template, but again not for automatically creating configuration files, and needs manual intervention.
    4) Excel Macro: It seems that some people have achived to automatically create configuration files with using an excel macro, but we could not find a procedure or tip of how to achieving this.
    5) Pearl or TCL/TK Script: Again since we are not software developers but from networking field, it is difficult to achieve a working form of this scripts or codes due to to lack of documentation and development experience.
    So our problem comes down to creating a template from a sample configuration, and creating bulk configuration files from the template. Is there a specific tool or procedure to achive this purpose?
    Thanks in Advance,
    Best Regards,

    Hi,
    Try this one http://www.gen-it.net
    Regards,
    Stuart

Maybe you are looking for

  • Apple Remote stopped working with Lion on iMac

    My white Apple Remote does not work with Lion on my iMac 2.4ghz Core 2 Duo anymore. I'm sure it was working recently as I was able to control the volume on my RadioShark application.  Now that doesn't work anymore and I can't seem to get the remote t

  • Bluetooth does not work well after upgrade to win 8.1 from win 8

    System:                       Dell Inspiron 15R 5520 Bluetooth hardware:   Intel(R) Centrino(R) Wireless Bluetooth(R) 4.0 + High Speed Adapter                                      Microsoft Bluetooth Enumerator Ever since I upgraded from Win 8 to 8.1

  • What adapter do i need for my macbook pro for a presentation

    what adapter do i need for my macbook pro for a presentation

  • PE12 Installation Problems

    I recently purchased a license for the downloadable version of Photoshop Elements 12, PC version. (I run Windows 8.)  After downloading, I attempted to install the software, which was rolled back due to "Shared Technologies" not installing properly.

  • Mouse and Apple TV issue

    My mouse is not working on my mac, I changed the batteries and followed the support info but nothing worked. I have a solid green light and am able to click but it will not move the arrow location. Also I just tried to log into my apple tv to watch a