Switching to Root
Dear all,
Today I faced a very strange issue while switching to root account in a bash shell.My OS : CentOS-5.1.4 I logged in my system with account name user1 and I open the terminal and below shell opens [user1@localhost ]$ Now when I type su and want to switch to root account , it fails [user1@localhost ~]$ su Password: su: incorrect password [user1@localhost ~]$ exit I know the password is 123 & I m 100% sure . Can anyone tell me how to solve the issue. Thanks |
I miss the hyphen...try
Quote:
Thor |
Did it worked before?
Type the password in the userfield to see if the keyboard layout is correct. Does it work when you login as root via Code:
CTRL_ALT_F1 Code:
sudo |
let me guess:
the password WAS 123 someone logged in changed the password now you're locked out If the system was connected to a network, it may well be what happened ... |
@ 16pide
Hmmm...did'nt go there yet. Come to think of it, that is a possilbe scenario. At the sight of the password, I hoped it to be an isolated test system...but of course, when linked to a network... :) |
You can reset the password by rebooting into single-user mode, and running the passwd command. To enter single use mode on most desktop or server systems, press any key at the grub prompt, and append the word 'single' to the 'append' entry for the kernel version you will be booting.
Use a strong password, and never use programs that send passwords in cleartext (telnet is the big loser here). And if you're on a network, don't forget it might be your host, but it's everyone's network, and we are all affected if your host gets hacked. --- rod. |
Thank U all,
I solved the issues by issuing the below command : chmod 4755 /bin/su & I also issue the below commands after some googling : chmod 777 /usr/bin/passwd chmod 777 /etc/passwd chmod 777 /etc/shadow Would it effects the system ? Thanks |
Quote:
/usr/bin/passwd should be 4755 /etc/passwd should be 644 and /etc/shadow should be 000 777 grants every user on the system read write and execute permissions to the files two of which don't need ANYONE to have execute permission and only ROOT should have write permission to /etc/passwd NOBODY other than root should even be able to READ let alone WRITE to /etc/shadow and NOBODY should be able to write to the /usr/bin/passwd, it's a binary anyways so there isn't any need. those permission settings are just asking for a trouble, big time would it effect the system? YES it would leave a security hole big enough to pilot an aircraft carrier through. |
like Frieza said, revert what you did to those crucial files. You've opened a major security hole!
|
All times are GMT -5. The time now is 01:58 AM. |