Koozali.org: home of the SME Server

Obsolete Releases => SME Server 8.x => Topic started by: emshu on January 21, 2015, 01:13:17 PM

Title: Cannot access root
Post by: emshu on January 21, 2015, 01:13:17 PM
Hello. I have this problem : I ,when logged as root, changed permissions of the /usr file to 777. Now I cannot connect to root account anymore or to server manager. Directly at server computer it says that login is incorrect. When trying to access by other computers via Putty, I get "connection refused". How do I change back the permissions back when I cannot log to root? Without reinstalling the server.

P.S. I can log in as admin, the domain works, everything works. I just cannot log in to root.


Thank you in advance, Emshu
Title: Re: Cannot access root
Post by: ReetP on January 21, 2015, 02:32:25 PM
Hello. I have this problem : I ,when logged as root, changed permissions of the /usr file to 777. Now I cannot connect to root account anymore or to server manager. Directly at server computer it says that login is incorrect. When trying to access by other computers via Putty, I get "connection refused". How do I change back the permissions back when I cannot log to root? Without reinstalling the server.

/usr is not a file, it is a directory. Why would you want to change it to 777 ? It should be 0755 and should never need touching.

If you changed permissions recursively (through all the /usr/* directories) you may be in for a big job.

Please tell us what was the exact command you used ?

Next. Did you change anything else ?

Although you can reset the root password, it may not fix your problems depending on what you did to your server.

You should be able to boot the machine in single mode and reset your root password.

Reboot.

Press Esc to stop the automatic timeout.

Select the top kernel and press 'a' to append to the kernel line

On the next screen add the word 'append' 'single' to the end of the line then press enter to boot.

This drops you to single mode.

Type:

passwd root

to change your password.

shutdown -r now

Once you have got your root password back I think you need to try the server manager and change the admin password to get them back in sync correctly.

B. Rgds
John
Title: Re: Cannot access root
Post by: guest22 on January 21, 2015, 03:19:00 PM
On the next screen add the word 'append' to the end of the line then press enter to boot.
On the next screen add the word 'single' to the end of the line,  then press enter to boot.


http://wiki.contribs.org/SME_Server:Documentation:FAQ/it#Reset_the_root_and_admin_password
Title: Re: Cannot access root
Post by: ReetP on January 21, 2015, 04:28:26 PM
On the next screen add the word 'single' to the end of the line,  then press enter to boot.

Thanks HSF - brain is like mush today

Even tested it first !
Title: Re: Cannot access root
Post by: Stefano on January 21, 2015, 09:53:31 PM
IMO it's not a password issue, but a permissions one..

emshu, please give us as much details as you can about the (wrong) command you gave..

moreover, please tell us what you tried to achieve, thank you
Title: Re: Cannot access root
Post by: CharlieBrady on January 22, 2015, 05:58:14 PM
Hello. I have this problem : I ,when logged as root, changed permissions of the /usr file to 777.

Do not ever change the permissions of any directory to 777. That's a perfect way to open your system to crackers or to permanently break it.

Your best option is to reinstall and restore from backup.
Title: Re: Cannot access root
Post by: Stefano on January 22, 2015, 07:11:47 PM
I agree with Charlie..
Title: Re: Cannot access root
Post by: emshu on January 24, 2015, 03:36:15 PM
The command was : Chmod 777 -R /usr . I'm new to all this, but I understand my mistake now :) Anyway, reinstalling isn't an option, because the server had eshop and a webpage running on it. Any ideas how to retrieve mysql databases now? Mysqldump gives absolutely no response. When I type the full command "mysqldump -u root -ppassword --alldatabases > backupas.sql" nothing happens at all. It just freezes and gives no answer. I can type things, but it does not respon to any commands then. It's just a blank row. Any idea how to get those databases? I can't connect to phpmyadmin now :)
Title: Re: Cannot access root
Post by: guest22 on January 24, 2015, 03:43:30 PM
The command was : Chmod 777 -R /usr . I'm new to all this, but I understand my mistake now :) Anyway, reinstalling isn't an option, because the server had eshop and a webpage running on it. Any ideas how to retrieve mysql databases now? Mysqldump gives absolutely no response. When I type the full command "mysqldump -u root -ppassword --alldatabases > backupas.sql" nothing happens at all. It just freezes and gives no answer. I can type things, but it does not respon to any commands then. It's just a blank row. Any idea how to get those databases? I can't connect to phpmyadmin now :)

You say you are new to this? Then all of the above indicates to me that you should read the manual first. And certainly not run a production server before you've done that. Especially if you run it for someone else.

Asking a question if just fine, asking for a crash course is not. Again, read the manual and test what you want to do.


Sorry.
Title: Re: Cannot access root
Post by: Stefano on January 24, 2015, 04:00:16 PM
emshu: where is your web appplication installed? into an ibay? in /opt? how did you setup it?

in any case, if you put it into an ibay, just backup and restore (because you HAVE a backup, haven't you?)

does server-manager work? if so, setup a backup, run it and you're done

P.S. nowadays everybody can use virtualization to test and learn.. please, do it, thank you