LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   admin (https://www.linuxquestions.org/questions/linux-newbie-8/admin-68103/)

Nick5449 06-25-2003 09:47 PM

admin
 
How do I become an admin, so I can edit all of the files. For example when I try to access the root file, it says "You do not have the permission necessary to view the contents of 'root'". Also I want to edit the rc.local file(/etc/rc.d), but it won't let me...why?

contrasutra 06-25-2003 09:53 PM

in a console, type: "su"

Then it will ask you for your password.

Then you are root for that session and you can edit ANYTHING (so be careful).

The administrator in Linux is ROOT. At a login prompt, you could also type "root".

joesbox 06-25-2003 11:00 PM

but remember it is not a good thing to log in as root due to the fact that root can change anything and everything. one little screwup and it is back to reformat and reload.

xiaodown 06-26-2003 03:03 AM

It's also good practice to get in the habit of typing a dash after su, as in:

su -

Which makes it execute root's startup script (in a new shell) when you become root. This will set you up so that you have root's path, which is probably different from most user's paths. This solves some problems of people not having common commands (like ifconfig) in their path, even after they've become root - they didn't adopt root's settings.

This goes for su'ing to anything. From root, you can su to anyone's user account, and you'd still want to "su - username". You can, of course, su to anyone from anyone (on non-wheel systems), but if you're root, it doesn't ask for passwords - Yet another affirmation of what people above this post have said: beware if you're root, you *can* very easily screw something up.

~Will

Nick5449 06-26-2003 03:30 PM

okay...i logged in as root. I want to edit the rc.local file (/etc/rc.d). I was told that in this file you can add lines that will run during startup. I want to do this because eveytime I log in, my internet wont work, so I have to go to the terminal every time and type:
modprobe hermes
modprobe orinoco
modprobe orinoco_pci
I have to do this for my drivers for my linksys wmp11 card. So by putting these files in the rc.local file, they will simply just run on startup....right?? But the thing is, I cant edit the file (or i'm just stupid, and not doing something right). Can someone please tell me how to edit this file. Thanks!

xiaodown 06-28-2003 12:47 AM

You mean you can edit the file, but you can't save the changes? Or, it won't let you do anything with the file?

First, check the permissions ( ls -l | grep file ) - look at all the rwxrwx stuff on the left side.

if necessacary, change the permissions to something like 750.

If you're using vi (like all good unix gurus =), then you can just edit the file and give it a bang (instead of colon-wq to quit, use colon-wq! - the ! forces it to save). Root rocks.

Obelix 06-28-2003 03:35 AM

Is that a read only file?

KePSuX 06-29-2003 10:38 AM

It's permissions on this system are 755 (redhat 9)


All times are GMT -5. The time now is 11:40 AM.