LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   pls help me about this problem. (https://www.linuxquestions.org/questions/linux-newbie-8/pls-help-me-about-this-problem-829467/)

marvinC 08-31-2010 04:05 AM

pls help me about this problem.
 
hi,
does anyone know how to fix this prob.
at first I'm working with my root terminal because it change from local host to -bash-3.2#, but thank god I already solve it.. but after that, I used to logout from my previous session, and when I come back in.. my username and password did not already recognize.. when i insert them, nothings happened.. I'm stock on log in menu. I try to insert other username and password but then it saids to be invalid, but when I'm inserting the real username and password, It's just like resetting all over again.

Kenny_Strawn 08-31-2010 04:13 AM

Need more specific details. You mean to tell me your PS1 environment variable was missing but got fixed?

If you deleted your home directory, you obviously cannot log in. NEVER RUN COMMANDS FROM AN UNTRUSTED SOURCE!!! If you see any commands you might think are dangerous to execute, please let me know. Here is a list of commands that can cause damage to your system. The command to delete your home directory (/home/<username>) is in there, if you accidentally ran it tough luck.

marvinC 08-31-2010 04:19 AM

export PS1='\u@\h:\w>'

this is the command I used to solved my prob regarding to -barsh-3.2#. and now, that it's ok already.. I can't access my username and password to localhost

Disillusionist 08-31-2010 04:28 AM

I am a bit confused about what problem you are experiencing.

You state that you had an issue with the PS1 prompt, but then state that you are unable to login with your user account.

Are you able to login as the root account?

If so, you can reset the password for your user account:
Code:

passwd username
entering your user name in place of username

marvinC 08-31-2010 04:28 AM

Quote:

Originally Posted by Kenny_Strawn (Post 4083255)
Need more specific details. You mean to tell me your PS1 environment variable was missing but got fixed?

If you deleted your home directory, you obviously cannot log in. NEVER RUN COMMANDS FROM AN UNTRUSTED SOURCE!!! If you see any commands you might think are dangerous to execute, please let me know. Here is a list of commands that can cause damage to your system. The command to delete your home directory (/home/<username>) is in there, if you accidentally ran it tough luck.





export PS1='\u@\h:\w>'

this is the command I used to solved my prob regarding to -barsh-3.2#. and now, that it's ok already.. I can't access my username and password to localhost

marvinC 08-31-2010 04:32 AM

Quote:

Originally Posted by Disillusionist (Post 4083267)
I am a bit confused about what problem you are experiencing.

You state that you had an issue with the PS1 prompt, but then state that you are unable to login with your user account.

Are you able to login as the root account?

If so, you can reset the password for your user account:
Code:

passwd username
entering your user name in place of username


yaa.. at first i do had an issue with PS1, but then I already solve it. and then, after that I used to logout.. but when I'm logging back in, I can't access already my account. yaa I'm using a root account.. but then also, there's no INVALID LOG IN indicating on my screen. It's just, when I insert my current UN and PW, nothings happens.

Kenny_Strawn 08-31-2010 04:34 AM

Read what I posted about possibly (albeit accidentally) deleting your home directory. THIS WILL PREVENT YOU FROM LOGGING IN!!! Try booting from your Live CD and running the following commands:

Code:

sudo fdisk -l
sudo mount -t ext4 /dev/LOCALDISKDEV /mnt #while /dev/LOCALDISKDEV is the device file (typically /dev/sda1) that your Linux operating system is installed on.
ls /mnt/home

Post the output of ls /mnt/home here. If it reads empty, that means you accidentally deleted your home directory.

marvinC 08-31-2010 04:37 AM

this is the scene..

CentOS release 5.3 (Final)
Kernel 2.6.18-128.2.1.e15 on an i686

localhost login: root
password:

(after i enter my password, this statement below appear)

CentOS release 5.3 (Final)
Kernel 2.6.18-128.2.1.e15 on an i686

localhost login:
password:

(but when I insert other UN and PW that I know wrong, this will appear)


localhost login:
password:

LOG IN INCORRECT

Kenny_Strawn 08-31-2010 04:45 AM

Yikes, that's pretty serious. Like I said, boot from the CD and try to fix it from there. Please note that /root is the name of root's home directory. So, please post the output of sudo fdisk -l run from the CD.

marvinC 08-31-2010 04:48 AM

Quote:

Originally Posted by Kenny_Strawn (Post 4083283)
Yikes, that's pretty serious. Like I said, boot from the CD and try to fix it from there. Please note that /root is the name of root's home directory. So, please post the output of sudo fdisk -l run from the CD.

ok I try it.. btw, thanks


All times are GMT -5. The time now is 11:04 PM.