What does Linux use instead of a Registry?

TechnoPro

Golden Member
Jul 10, 2003
1,727
0
76
I know what the reigstry does in Windows. What is the Linux equivalent? Confiiguration files?

I'm asking because a client of mine attempted to repair a problem by tinkering in the registry and the results were not pretty. In Linux, would it be comparatively as easy to "break" the OS?
 

n0cmonkey

Elite Member
Jun 10, 2001
42,936
1
0
Plain text configuration files. Fixing them is as simple as booting into either single user mode or off a rescue cd, firing up your favorite editor, and making a few changes.
 

drag

Elite Member
Jul 4, 2002
8,708
0
0
It's easy to break Linux. Just go rm -rf / as root and it will happily self-destruct. :)

Configuration files are generally stored as 'plain text' ascii files. System-wide configuration files are generally stored in the /etc/ directory. This direction is about the closest equivelent to the windows registry that your going to find. If you edit those files you can protect yoursellf from any mistakes by making copies of those files before you edit them. Then if you do it wrong, you just copy the files back over.

It would take a lot of effort to get to the point were you 'ruin' the OS by editing configuration files. If you edit lilo.conf wrong and then run lilo you can render the system unbootable, but then you can come in with a rescue disk, use chroot (if you know how) and fix it manually. If your using grub you can mess up the grub.conf or something like that, but then you'd have to manually enter the right boot command at start up instead of selecting from a list of boot commands, or use a rescue disk.

Generally what happens is a degragation of functionality. Edit a config wrong and you'd loose your web server or if you edit fstab wrong you could loose the ability to mount a cdrom or whatnot. Most of the time it's easily fixable, especially if you make backups of the files before you edit them.

Users are not allowed to access anything outside their home directories. So their configs (refered to as user preferences) are stored in .filename and .directoryname files and directories. These are dynamicly created, usually, when you start up a program. The dot before the name makes the name hidden.

Many of these you can manually edit, but it's usually easier to use the configuration tools provided by the various apps. Gnome and KDE have a sort of 'registry' that they use for storing their configs. Gnome has it based around a hidden directory of xml-formatted text files that hold that information. Generally you don't want to edit those.

As a user it's pretty easy to find a bug or have a config file that gets messed up. For instance you could select a screwed up theme in gnome and make the text the same color as the background or something like that.

So often you can simply delete these hidden files, but often they store things like you bookmarks or email in them so it may be smarter to copy them somewere safe before removing them.

To get your user back to a clean slate you can do something like this:
cd ~
mkdir backup.configs
cp -r .??* backup.configs/

The .??* means that all the files beginning with . that have 2 or more other characters in it's name gets moved to backup.config directory. Each ? represents one wildcard that requires a character being present. Otherwise you may accidently remove or move the . or .. files that represent the current directory and parent directory.
(go "cd ." and "cd .." to see what happens)

then logout. Sometimes you have to kill the gconf2 configuration monitoring deamon and clean out /tmp directory, but that's what you do. If you want to get them back to the original condition copy them back to your home directory. You can also selectively go thru them and copy them back to their original place.

All of this works best while your not in X, of course, and if you know how to operate from a command line it makes Linux much more powerfull to use.
 

TechnoPro

Golden Member
Jul 10, 2003
1,727
0
76
Personally, given that I like working on a command prompt and with text files, this sounds great! But I am envisioning having to support an end-user (i.e. non savvy) and it doesn't look pretty. Again, I don't know Linux well enough to be objective, but the thought of walking someone through editing a text file over the phone seems tricky. I like the idea of a GUI wrapper, but I'm curious if there is some standardization among the distros. Meaning, would the GUI to change display properties on Fedora be the same as on Mandriva?

I can walk someone through virtually anything in XP. Would you Linux pros be able to walk me through setup and troubleshooting of Linux, irrespective of the distro?

And by no means am I bashing that which I do not have mastery over. I'm just thinking out loud about deployment to avergae, non-technical users (i.e. 85% of my clientelle). Assuming that a user is properly set up and trained, I would assume Linux to be comparable in terms of usability, as in click here for e-mail, click here for word processing, etc.

What about stability? If left alone, I consider XP to be very stable. Throw in spyware, malware, viruses, etc. and that statement is no longer true. Is Linux resistant to these threats?

My exposure started with Knoppix which was fun. I then went for Ubuntu. After seeing that it could basically do what my Windows PC can do AND has a pretty interface, I became bored with it... I guess I should probably peer under the hook behind all the stylish UI elements and learn the command line.
 

pcgeek11

Lifer
Jun 12, 2005
22,227
4,932
136
Originally posted by: TechnoPro
Personally, given that I like working on a command prompt and with text files, this sounds great! But I am envisioning having to support an end-user (i.e. non savvy) and it doesn't look pretty.

Well if you are setting the system up, get it set the way the customer wants, then set them up as a user without root ( Admin ) rights and they cannot screw up the configuration files as the system will not allow them to write to it. Windows should be run the same way. That is how I keep my wife and kids from screwing up the system at home. NO Admin Rights, except me!

pcgeek11


 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
I can walk someone through virtually anything in XP. Would you Linux pros be able to walk me through setup and troubleshooting of Linux, irrespective of the distro?

Depends on how well you take direction. But as long as there's a network connection working, you can ssh in and fix it without having them do anything.

What about stability? If left alone, I consider XP to be very stable. Throw in spyware, malware, viruses, etc. and that statement is no longer true. Is Linux resistant to these threats?

Somewhat resistant, the fact that there is none available right now definately helps. The problem with most spyware, malware, etc isn't the software but the fact that the user's download and run the software and nothing is going to help with that.

 

sourceninja

Diamond Member
Mar 8, 2005
8,805
65
91
"What about stability? If left alone, I consider XP to be very stable. Throw in spyware, malware, viruses, etc. and that statement is no longer true. Is Linux resistant to these threats?"

If the user does not run as root, spyware wont be a problem. Sure it could download itself to the users home directory, but then it will really only effect that user. Or a simpiler solution would be to mount your home directory wtih noexec, but then users could not run programs out of their home directory. I'm not sure if that would cause in a problems (I've never tried it). But it would keep that from happening.

Linux is harder to attack because of 2 things. A decent security model (Which requires the users to use it). And diversity. With windows, most users run as admin so anything can be done to their system. This means spyware can just install where ever it pleases and screw stuff up. Secondly there is only 1 windows. Its easy to target. Its not so easy to target linux which has hundreds of different variations, patches, etc. Just look at the startup scipts used by debian, arch, and gentoo. They are all setup different. Some distro's put gnome in /opt, while others put it in /user/local/.

Although, again, a system is only as secure as its users. A crazy user could run as root all the time, and their box will have lost a lot of security. Another user could run firefox in a chroot jail just to be extra sure they are protected. Its about balanced usablity and security. This is something I see Ubuntu as making good strides twoards with its use of sudo. With sudo, the root account will not allow logins, but you run commands that need to be ran as root by typing sudo command. It then prompts you for your password before running the command. Another thing I see growing popular in security is the use of the SELinux kernel. This kernel adds a lot of security options, and doesn't add much overhead to what the user already has to know to use linux.

I'm not sure if linux will ever be the standard desktop OS. I'm not sure I even want it to be. But I do know that it will be leading the technology to help make the future versions of desktop OS's like windows and mac grow in a more stable, secure direction.
 

n0cmonkey

Elite Member
Jun 10, 2001
42,936
1
0
Originally posted by: TechnoPro

I can walk someone through virtually anything in XP. Would you Linux pros be able to walk me through setup and troubleshooting of Linux, irrespective of the distro?

No need, there is freely available documentation out there. :)
 

TechnoPro

Golden Member
Jul 10, 2003
1,727
0
76
Originally posted by: Nothinman
I can walk someone through virtually anything in XP. Would you Linux pros be able to walk me through setup and troubleshooting of Linux, irrespective of the distro?

Depends on how well you take direction. But as long as there's a network connection working, you can ssh in and fix it without having them do anything.

What about stability? If left alone, I consider XP to be very stable. Throw in spyware, malware, viruses, etc. and that statement is no longer true. Is Linux resistant to these threats?

Somewhat resistant, the fact that there is none available right now definately helps. The problem with most spyware, malware, etc isn't the software but the fact that the user's download and run the software and nothing is going to help with that.

I take direction well. Of concern to me are the people who, when told to double-click, ask "with the left or right?" I frequently use VNC to work remotely, but still find cases when phone instructions are handy. Frankly, I prefer a VNC session as I can observe the error myself, and not speculate on cause and solution based on a non-technical description.

About the whole virus, spyware, malware issue... I've heard the arguement that as the Linux market share and user base increases, the number of tangible threats will increase as well. I would assume that as the market share increases as well, an increasing number of non security-conscious users will climb on board as well. As in the type of person who would download and execute the unknown file...

From my vantage point, specializing in the SOHO and small business market, it's easy for me to say that most problems are ultimately attributable to user error or user ignorance. While I am grateful for this as it feeds and clothes me, I would also like to imagine an OS that is somehow more robust, one that can take a beating and still plug away.
 

TechnoPro

Golden Member
Jul 10, 2003
1,727
0
76
Originally posted by: n0cmonkey
Originally posted by: TechnoPro

I can walk someone through virtually anything in XP. Would you Linux pros be able to walk me through setup and troubleshooting of Linux, irrespective of the distro?

No need, there is freely available documentation out there. :)

Sure, for a certain level of computer user who wants to fix things themselves. My work exposes me to people who pay to that things run smoothly. So if my clients adopted Linux en masse, my concern would be to effective provide support for any distro they might have chosen. Won't happen for a while, though.
 

sourceninja

Diamond Member
Mar 8, 2005
8,805
65
91
Most of the differences in distro's are idealogy.

For example, If I called you and told you I wanted apache installed on my server, you have a few ways to go about that. If I was using gentoo, you would use the portage system. If I was using debian, you would use apt. If I was using redhat, you could find a rpm of apache to install. But in all these cases, you could just download the source to apache and install it by hand.

The other main difference is location and default software choice. If i'm using ubuntu and I have problems with X not picking up my nvidia drivers for 3d and my resolution being low you would have to go to /etc/X11/xorg.conf. This is because ubuntu uses X.org for its X server. Now if I was using debian, you would need /etc/X11/x86config because debian has not yet switched to xorg and still uses xfree86. But in both cases the file is setup almost exactly the same (in fact I use my old x86config file still with just some minor tweaks.

So it comes down to the distro's choice of software (kde vs gnome, syslog-d vs metalog, sendmail vs postfix, bash vs ksh vs zsh, etc) and location of files. The concepts are still the same and chances are, if you need to do something, someone else already has. So a quick google linux search should get the answer.
 

TGS

Golden Member
May 3, 2005
1,849
0
0
Originally posted by: TechnoPro
Originally posted by: n0cmonkey
Originally posted by: TechnoPro

I can walk someone through virtually anything in XP. Would you Linux pros be able to walk me through setup and troubleshooting of Linux, irrespective of the distro?

No need, there is freely available documentation out there. :)

Sure, for a certain level of computer user who wants to fix things themselves. My work exposes me to people who pay to that things run smoothly. So if my clients adopted Linux en masse, my concern would be to effective provide support for any distro they might have chosen. Won't happen for a while, though.

You could always do stealth fixes, by SSHing into the boxes in question and fixing configs yourself. I prefer the config method of administration. As the conf,stop, and start scripts are all nice and human readable, making for relatively easy editing. The fact you can do a ton of troubleshooting and fixing without having to do reboots is seriously one of the best parts.