Results 1 to 4 of 4
I am new to Linux so please cut me a little slack. I learn quickly though. I have been trying to get Mandrake 10.1 to allow me to edit, create ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 03-24-2005 #1Just Joined!
- Join Date
- Mar 2005
- Location
- Charlotte, NC
- Posts
- 2
Logging in as root in Mandrake 10.1
I am new to Linux so please cut me a little slack. I learn quickly though. I have been trying to get Mandrake 10.1 to allow me to edit, create and delete files and directories. No luck. I figured the easiest way would be to log in as root and edit my account so I could.
I did a little searching and found another post on here that suggested I edit the KDMRC to allow root login at the login prompt. Only problem is that I can't save the edited file unless I am logged in as Root. ARGGGG!
I have not used a command line interface since dos so I would prefer to get all this done in the GUI until I am more famiular with Linux and can begin learning the command line.
Anyone have any suggestions? Please...help!
NCMattJ
- 03-24-2005 #2Just Joined!
- Join Date
- Feb 2005
- Posts
- 32
This might be a pretty easy way to do you edits. Go to the terminal and put in:
su
then put in your root password. Now you are root.
Now type in:
kwrite (you'll probably have this installed)
Now you can edit files in a GUI as root. Next type in:
konqueror
From here you can create new folders and move files around easily. If there is some other program you'd like to use, right click on the shortcut in the menu and click properties. It will tell you what command you can use to run the program. As long as you run the command as root in a terminal you will have root privileges.
- 03-24-2005 #3Just Joined!
- Join Date
- Mar 2005
- Location
- Indiana
- Posts
- 54
The command line is your friend. A little bit of time in the shell will convince you that it is much cooler than DOS.
As far as the editing:
I would modify permissions if editing was going to be frequent and I didn't like command lines.
Each file has associated with it a set of permissions -- effectively nine bits determining what three different types of users can do with the file. Someone accessing a given file may belong to the "user" type, "group" type, or the "other" type. By "what can be done," I mean "read," "write," and "execute." The "user" type might be confusing; just consider it to be synonymous with "owner."
The things you that you have not been able to edit as a regular user probably do not have the "write" bit set for the "other" type.
Open a terminal, switch to root, and change the working directory to that of a file you want to edit (let's say you want to edit /etc/X11/XF86Config):
Check the permissions of the file:Code:$ su [enter root password] $ cd /etc/X11
The first character you can ignore (the dash means that it's a regular file), the following nine characters indicate whether "reading," "writing," or "executing" are allowed for the "user," "group," or "other" types respectively. You are concerned with allowing "other" to "write" so do the following:Code:# ls -l XF86Config -rw-rw-r-- 1 root root 3204 Mar 24 01:15 XF86Config
(note chmod xyz XF86Config, replacing x, y and z with integers from 0 to 7, also sets permissions. This is just decimal counting after separating the settings of the user-types: r, w and x represent 1, and - represents 0; so rw-rw-r-- is 110 110 100, or 6 6 4. Concatenation gives 664.).Code:# chmod o+w XF86Config
ls again will show the change:
Now you should be able to edit/save/trash the files in KDE (or something else) with an editor like Emacs or KWrite.Code:# ls -l XF86Config -rw-rw-rw- 1 root root 3204 Mar 24 01:15 XF86Config
To revert to the original setting:
Disclaimer: I'm not an expert, so if one advises against this method then I would probably listen to him. This has worked for me, so I thought I'd share.Code:# chmod o-w XF86Config
- 03-24-2005 #4Just Joined!
- Join Date
- Mar 2005
- Location
- Charlotte, NC
- Posts
- 2
Thanks!
Thanks everyone! The command line thing works. With that bit of info, I can figure the rest out (I like to figure it out on my own...the whole reason I am running linux on my secondary computer)
Cheers all!
NCMattJ


Reply With Quote
