LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Can't login linux (https://www.linuxquestions.org/questions/linux-newbie-8/cant-login-linux-723135/)

txchien 05-02-2009 08:48 AM

Can't login linux
 
Login Linux with message:
"Give root password for maintenance"

Reason:
I was to mount 2 partitions with 2 folders and add text in the file "/etc/fstab". I have a problem with save file:
E45: 'readonly' option is set (add ! to override)

Please help me.
Thanks.

tronayne 05-02-2009 09:08 AM

It looks like you're logged in as "you" and you're trying to edit the system file /etc/fstab; that file can only be written to by the super-user (root). To edit that file, you must know the root password and you can temporarily become root with the su or sudo utilities (both require the root password); e.g.,
Code:

su
Password: <type the root password>
# vi /etc/fstab

You exit su (or sudo) by typing Ctrl-D or exit at a command prompt.

If you do not know the root password, you will not be able to edit system files.

Whenever you attempt to edit a file that you do not own or a file that you do own but is read-only, the editor will want you to override with a "bang" (the exclamation point); in vi or its derivatives, you would enter
Code:

:w!
Again, however, if you do not own or have write permission, that will fail.

Take a look at the manual pages for su and sudo for more information.

Hope this helps some.

txchien 05-02-2009 09:51 AM

thanks "tronayne"
so, I mount 2 partitions with 2 folders and add text in the file "/etc/fstab", then auto mount when power-on.
I have a problem when login:
"Give root password for maintenance"
After, I login with password of root, in text mod:
"repair filesystem" #

now, I want login with text mod normal, example:
[root@localhost root#]
please help me!!!

malekmustaq 05-02-2009 10:18 AM

txchien:

What Linux distro are you using?

It seems your system is needing a system file check while mounted as read only.

To make things simple, if no important file is at stake, you better reinstall your Linux.

hope this helps. goodluck

txchien 05-02-2009 10:25 AM

I am using CentOS 5.0


All times are GMT -5. The time now is 02:47 AM.