help. made a mistake editing /etc/group
hello,
i made a stupid mistake while editing /etc/group. i deleted the 'console' entry... what does it look like by default? so i can just type it back again. how will this affect my computer. anyway, thanks mike |
on my system:
Code:
console::101: |
Quote:
Code:
console::101: |
thank you very much. :)
i apologize for bothering you with my carelessness |
Quote:
|
I always make a backup of any file I edit outside my home directory especially in '/etc'. For example if I were to edit '/etc/group', before editing it I would make a copy called '/etc/group.$USER-backup' or something like that. That way if I completely mess it up, I can just copy it back and start over.
|
wouldn't vim have created a backup anyways? /etc/group~
|
Yes, but I hate vim.
|
thanks for the tips.
I'm still using nano and I'm not sure if it automatically creates backups. Anyway, I'm backing files up manually before I edit them from now on. :) Thanks for helping this linux/slackware newbie. :D |
Quote:
|
even kedit makes a backup :P
And how do you use kedit as root ? (I did xhost+ once, but thats said to be a security hole) |
Quote:
|
nano and nedit, those are the only ones I use. vim is just ridiculous, I can't believe anyone likes it, but whatever.
|
Quote:
And forgive me for threadhijacking! |
I usually run "xhost local:" (note the colon at the end) to enable any local user to use the X server. I'm not sure that's good from a security point of view, but it's definitely better than using "xhost +". After doing that, root should be able to use the X server too provided DISPLAY is set to ":0", for example.
|
I would have done:
Code:
kdesu kedit /etc/group |
I usually use nano in a root shell prompt to edit files.
Sometimes I don't like to work as root and I'll make a copy of a file I want to modify and then I'll make changes to the copy as a regular user. When I'm finished editing then I'll su to root and copy the file into the proper place. Let us say you wanted to make changes to inittab. You could make a copy of that and place it in a directory (documents). As a regular user navigate to your directory and use kedit or kwrite to make changes to the copy then save. Then open up a shell prompt, su to root. # cd /home/hitest/documents # cp inittab /etc I also like to back-up files before I change them. |
All times are GMT -5. The time now is 09:21 PM. |