Cannot sign in my laptop after sudo admin problem in terminal

Clash Royale CLAN TAG#URR8PPP up vote
0
down vote
favorite
Whenever I open the terminal I'm Ubuntu 18.04
To run a command as administrator (user "root"), use "sudo <command>".
See "man sudo_root" for details.
After that, I can't get into any of my data in all folder such as download, document. Then I restart, sign in but it come back to sign in again.
Is all started when I want to install android studio by using this line, something like sudo mv ~ /Download/android-studio usr/local/.
Right now, I had just press Cntrl + Alt + F3, log in, and found this,
No directory, logging in with HOME=/
To run a command as administrator (user "root"), use "sudo <command>".
See "man sudo_root" for details.
syafiq@asus-n45sf:/$
sudo root administration
 |Â
show 7 more comments
up vote
0
down vote
favorite
Whenever I open the terminal I'm Ubuntu 18.04
To run a command as administrator (user "root"), use "sudo <command>".
See "man sudo_root" for details.
After that, I can't get into any of my data in all folder such as download, document. Then I restart, sign in but it come back to sign in again.
Is all started when I want to install android studio by using this line, something like sudo mv ~ /Download/android-studio usr/local/.
Right now, I had just press Cntrl + Alt + F3, log in, and found this,
No directory, logging in with HOME=/
To run a command as administrator (user "root"), use "sudo <command>".
See "man sudo_root" for details.
syafiq@asus-n45sf:/$
sudo root administration
1
You mean you are in an endless log-in loop now after you ran some command usingsudofrom the command line? Whatsudocommand did you run?
â WinEunuuchs2Unix
Jun 10 at 20:42
1
@WinEunuuchs2Unix I got endless log in loop after restart my laptop, before restart I did run sudo apt-get update after that command (in the question above).
â Syafiq Firdaus
Jun 10 at 20:50
2
Did you perhaps accidentally move everything in your home directory (including the.sudo_as_admin_successfulfile) to somewhere else?
â steeldriver
Jun 10 at 21:13
Is that a typo or did you put a space after ~ in the actual command?
â mchid
Jun 10 at 21:15
@steeldriver I don't remember
â Syafiq Firdaus
Jun 10 at 21:17
 |Â
show 7 more comments
up vote
0
down vote
favorite
up vote
0
down vote
favorite
Whenever I open the terminal I'm Ubuntu 18.04
To run a command as administrator (user "root"), use "sudo <command>".
See "man sudo_root" for details.
After that, I can't get into any of my data in all folder such as download, document. Then I restart, sign in but it come back to sign in again.
Is all started when I want to install android studio by using this line, something like sudo mv ~ /Download/android-studio usr/local/.
Right now, I had just press Cntrl + Alt + F3, log in, and found this,
No directory, logging in with HOME=/
To run a command as administrator (user "root"), use "sudo <command>".
See "man sudo_root" for details.
syafiq@asus-n45sf:/$
sudo root administration
Whenever I open the terminal I'm Ubuntu 18.04
To run a command as administrator (user "root"), use "sudo <command>".
See "man sudo_root" for details.
After that, I can't get into any of my data in all folder such as download, document. Then I restart, sign in but it come back to sign in again.
Is all started when I want to install android studio by using this line, something like sudo mv ~ /Download/android-studio usr/local/.
Right now, I had just press Cntrl + Alt + F3, log in, and found this,
No directory, logging in with HOME=/
To run a command as administrator (user "root"), use "sudo <command>".
See "man sudo_root" for details.
syafiq@asus-n45sf:/$
sudo root administration
edited Jun 11 at 6:20
muru
128k19269459
128k19269459
asked Jun 10 at 20:40
Syafiq Firdaus
64
64
1
You mean you are in an endless log-in loop now after you ran some command usingsudofrom the command line? Whatsudocommand did you run?
â WinEunuuchs2Unix
Jun 10 at 20:42
1
@WinEunuuchs2Unix I got endless log in loop after restart my laptop, before restart I did run sudo apt-get update after that command (in the question above).
â Syafiq Firdaus
Jun 10 at 20:50
2
Did you perhaps accidentally move everything in your home directory (including the.sudo_as_admin_successfulfile) to somewhere else?
â steeldriver
Jun 10 at 21:13
Is that a typo or did you put a space after ~ in the actual command?
â mchid
Jun 10 at 21:15
@steeldriver I don't remember
â Syafiq Firdaus
Jun 10 at 21:17
 |Â
show 7 more comments
1
You mean you are in an endless log-in loop now after you ran some command usingsudofrom the command line? Whatsudocommand did you run?
â WinEunuuchs2Unix
Jun 10 at 20:42
1
@WinEunuuchs2Unix I got endless log in loop after restart my laptop, before restart I did run sudo apt-get update after that command (in the question above).
â Syafiq Firdaus
Jun 10 at 20:50
2
Did you perhaps accidentally move everything in your home directory (including the.sudo_as_admin_successfulfile) to somewhere else?
â steeldriver
Jun 10 at 21:13
Is that a typo or did you put a space after ~ in the actual command?
â mchid
Jun 10 at 21:15
@steeldriver I don't remember
â Syafiq Firdaus
Jun 10 at 21:17
1
1
You mean you are in an endless log-in loop now after you ran some command using
sudo from the command line? What sudo command did you run?â WinEunuuchs2Unix
Jun 10 at 20:42
You mean you are in an endless log-in loop now after you ran some command using
sudo from the command line? What sudo command did you run?â WinEunuuchs2Unix
Jun 10 at 20:42
1
1
@WinEunuuchs2Unix I got endless log in loop after restart my laptop, before restart I did run sudo apt-get update after that command (in the question above).
â Syafiq Firdaus
Jun 10 at 20:50
@WinEunuuchs2Unix I got endless log in loop after restart my laptop, before restart I did run sudo apt-get update after that command (in the question above).
â Syafiq Firdaus
Jun 10 at 20:50
2
2
Did you perhaps accidentally move everything in your home directory (including the
.sudo_as_admin_successful file) to somewhere else?â steeldriver
Jun 10 at 21:13
Did you perhaps accidentally move everything in your home directory (including the
.sudo_as_admin_successful file) to somewhere else?â steeldriver
Jun 10 at 21:13
Is that a typo or did you put a space after ~ in the actual command?
â mchid
Jun 10 at 21:15
Is that a typo or did you put a space after ~ in the actual command?
â mchid
Jun 10 at 21:15
@steeldriver I don't remember
â Syafiq Firdaus
Jun 10 at 21:17
@steeldriver I don't remember
â Syafiq Firdaus
Jun 10 at 21:17
 |Â
show 7 more comments
1 Answer
1
active
oldest
votes
up vote
1
down vote
You installed 18.04 on your hard drive, right? So, go back to the live system (on USB?), use the live system to start your system, sudo su in and now mount the hard drive partition with your home directory (recommended to /mnt). The message says, your home directory has not been found, so the system has been forced to use / as your home directory as fallback. The reason is most likely the mv command you mention. Since you've put the space between the ~ and the rest, you moved your users home directory (or more likely the content of it) to the folder /Download/android-studio usr/local/. Using root in your live system, go to this folder, take a look at the content and try to recover your users home directory. You might want to make sure, you don't miss any hidden dot-files. You need to move the moved files back to where they came from. Once done correctly, you should be able to reboot, start with your installed system, login as user and sudo. Starting with the live system and mounting to /mnt, don't forget to go to /mnt/home, not /home.
Nope, I upgraded it from 17.04, any alternative ideas? Such as any commands that I can type.
â Syafiq Firdaus
Jun 11 at 18:32
Doesn't make any difference. I just thought you might still have your USB live system from your installation. Otherwise, you can use the one from 17.04 too. The live system should be a running system without major error and you can easily sudo su to use the root account to access your hard disk. If you still have the live system from your installation, you can use it. Otherwise the suggestion is, to create a new one. You just need some reliable solution to access the hard disk and data for recovery. The live system is an according option.
â Neobie
Jun 11 at 18:48
Sorry, I quite lost right now, about live system, creating new one, I need to download ubuntu desktop again and install? What is reliable solution to access the hard disk and data for recovery? Can you give instruction step by step from A - Z? Much appreciated. Thanks.
â Syafiq Firdaus
Jun 12 at 14:49
1
@Neobie provided quite good step-by-step instructions. If you do not understand the steps, then backup your data and reinstall.
â user535733
Jun 13 at 3:14
You said you did install Ubuntu 17.04. You usually do this by use of a USB thumb drive, that contains a so called live system and you install from there. So, if you don't have the original one, as you said, you need to download Ubuntu again. You don't need to install it on your hard drive again. You just need to create the live system on a USB thumb drive. Depending on your operating system, you do that by use of some application like USB installer or unetbootin. Once the live system is on your USB thumb drive, you can start your laptop from this live system on your USB thumb drive and ...
â Neobie
Jun 13 at 14:23
 |Â
show 1 more comment
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
You installed 18.04 on your hard drive, right? So, go back to the live system (on USB?), use the live system to start your system, sudo su in and now mount the hard drive partition with your home directory (recommended to /mnt). The message says, your home directory has not been found, so the system has been forced to use / as your home directory as fallback. The reason is most likely the mv command you mention. Since you've put the space between the ~ and the rest, you moved your users home directory (or more likely the content of it) to the folder /Download/android-studio usr/local/. Using root in your live system, go to this folder, take a look at the content and try to recover your users home directory. You might want to make sure, you don't miss any hidden dot-files. You need to move the moved files back to where they came from. Once done correctly, you should be able to reboot, start with your installed system, login as user and sudo. Starting with the live system and mounting to /mnt, don't forget to go to /mnt/home, not /home.
Nope, I upgraded it from 17.04, any alternative ideas? Such as any commands that I can type.
â Syafiq Firdaus
Jun 11 at 18:32
Doesn't make any difference. I just thought you might still have your USB live system from your installation. Otherwise, you can use the one from 17.04 too. The live system should be a running system without major error and you can easily sudo su to use the root account to access your hard disk. If you still have the live system from your installation, you can use it. Otherwise the suggestion is, to create a new one. You just need some reliable solution to access the hard disk and data for recovery. The live system is an according option.
â Neobie
Jun 11 at 18:48
Sorry, I quite lost right now, about live system, creating new one, I need to download ubuntu desktop again and install? What is reliable solution to access the hard disk and data for recovery? Can you give instruction step by step from A - Z? Much appreciated. Thanks.
â Syafiq Firdaus
Jun 12 at 14:49
1
@Neobie provided quite good step-by-step instructions. If you do not understand the steps, then backup your data and reinstall.
â user535733
Jun 13 at 3:14
You said you did install Ubuntu 17.04. You usually do this by use of a USB thumb drive, that contains a so called live system and you install from there. So, if you don't have the original one, as you said, you need to download Ubuntu again. You don't need to install it on your hard drive again. You just need to create the live system on a USB thumb drive. Depending on your operating system, you do that by use of some application like USB installer or unetbootin. Once the live system is on your USB thumb drive, you can start your laptop from this live system on your USB thumb drive and ...
â Neobie
Jun 13 at 14:23
 |Â
show 1 more comment
up vote
1
down vote
You installed 18.04 on your hard drive, right? So, go back to the live system (on USB?), use the live system to start your system, sudo su in and now mount the hard drive partition with your home directory (recommended to /mnt). The message says, your home directory has not been found, so the system has been forced to use / as your home directory as fallback. The reason is most likely the mv command you mention. Since you've put the space between the ~ and the rest, you moved your users home directory (or more likely the content of it) to the folder /Download/android-studio usr/local/. Using root in your live system, go to this folder, take a look at the content and try to recover your users home directory. You might want to make sure, you don't miss any hidden dot-files. You need to move the moved files back to where they came from. Once done correctly, you should be able to reboot, start with your installed system, login as user and sudo. Starting with the live system and mounting to /mnt, don't forget to go to /mnt/home, not /home.
Nope, I upgraded it from 17.04, any alternative ideas? Such as any commands that I can type.
â Syafiq Firdaus
Jun 11 at 18:32
Doesn't make any difference. I just thought you might still have your USB live system from your installation. Otherwise, you can use the one from 17.04 too. The live system should be a running system without major error and you can easily sudo su to use the root account to access your hard disk. If you still have the live system from your installation, you can use it. Otherwise the suggestion is, to create a new one. You just need some reliable solution to access the hard disk and data for recovery. The live system is an according option.
â Neobie
Jun 11 at 18:48
Sorry, I quite lost right now, about live system, creating new one, I need to download ubuntu desktop again and install? What is reliable solution to access the hard disk and data for recovery? Can you give instruction step by step from A - Z? Much appreciated. Thanks.
â Syafiq Firdaus
Jun 12 at 14:49
1
@Neobie provided quite good step-by-step instructions. If you do not understand the steps, then backup your data and reinstall.
â user535733
Jun 13 at 3:14
You said you did install Ubuntu 17.04. You usually do this by use of a USB thumb drive, that contains a so called live system and you install from there. So, if you don't have the original one, as you said, you need to download Ubuntu again. You don't need to install it on your hard drive again. You just need to create the live system on a USB thumb drive. Depending on your operating system, you do that by use of some application like USB installer or unetbootin. Once the live system is on your USB thumb drive, you can start your laptop from this live system on your USB thumb drive and ...
â Neobie
Jun 13 at 14:23
 |Â
show 1 more comment
up vote
1
down vote
up vote
1
down vote
You installed 18.04 on your hard drive, right? So, go back to the live system (on USB?), use the live system to start your system, sudo su in and now mount the hard drive partition with your home directory (recommended to /mnt). The message says, your home directory has not been found, so the system has been forced to use / as your home directory as fallback. The reason is most likely the mv command you mention. Since you've put the space between the ~ and the rest, you moved your users home directory (or more likely the content of it) to the folder /Download/android-studio usr/local/. Using root in your live system, go to this folder, take a look at the content and try to recover your users home directory. You might want to make sure, you don't miss any hidden dot-files. You need to move the moved files back to where they came from. Once done correctly, you should be able to reboot, start with your installed system, login as user and sudo. Starting with the live system and mounting to /mnt, don't forget to go to /mnt/home, not /home.
You installed 18.04 on your hard drive, right? So, go back to the live system (on USB?), use the live system to start your system, sudo su in and now mount the hard drive partition with your home directory (recommended to /mnt). The message says, your home directory has not been found, so the system has been forced to use / as your home directory as fallback. The reason is most likely the mv command you mention. Since you've put the space between the ~ and the rest, you moved your users home directory (or more likely the content of it) to the folder /Download/android-studio usr/local/. Using root in your live system, go to this folder, take a look at the content and try to recover your users home directory. You might want to make sure, you don't miss any hidden dot-files. You need to move the moved files back to where they came from. Once done correctly, you should be able to reboot, start with your installed system, login as user and sudo. Starting with the live system and mounting to /mnt, don't forget to go to /mnt/home, not /home.
edited Jun 11 at 6:31
answered Jun 11 at 6:18
Neobie
964
964
Nope, I upgraded it from 17.04, any alternative ideas? Such as any commands that I can type.
â Syafiq Firdaus
Jun 11 at 18:32
Doesn't make any difference. I just thought you might still have your USB live system from your installation. Otherwise, you can use the one from 17.04 too. The live system should be a running system without major error and you can easily sudo su to use the root account to access your hard disk. If you still have the live system from your installation, you can use it. Otherwise the suggestion is, to create a new one. You just need some reliable solution to access the hard disk and data for recovery. The live system is an according option.
â Neobie
Jun 11 at 18:48
Sorry, I quite lost right now, about live system, creating new one, I need to download ubuntu desktop again and install? What is reliable solution to access the hard disk and data for recovery? Can you give instruction step by step from A - Z? Much appreciated. Thanks.
â Syafiq Firdaus
Jun 12 at 14:49
1
@Neobie provided quite good step-by-step instructions. If you do not understand the steps, then backup your data and reinstall.
â user535733
Jun 13 at 3:14
You said you did install Ubuntu 17.04. You usually do this by use of a USB thumb drive, that contains a so called live system and you install from there. So, if you don't have the original one, as you said, you need to download Ubuntu again. You don't need to install it on your hard drive again. You just need to create the live system on a USB thumb drive. Depending on your operating system, you do that by use of some application like USB installer or unetbootin. Once the live system is on your USB thumb drive, you can start your laptop from this live system on your USB thumb drive and ...
â Neobie
Jun 13 at 14:23
 |Â
show 1 more comment
Nope, I upgraded it from 17.04, any alternative ideas? Such as any commands that I can type.
â Syafiq Firdaus
Jun 11 at 18:32
Doesn't make any difference. I just thought you might still have your USB live system from your installation. Otherwise, you can use the one from 17.04 too. The live system should be a running system without major error and you can easily sudo su to use the root account to access your hard disk. If you still have the live system from your installation, you can use it. Otherwise the suggestion is, to create a new one. You just need some reliable solution to access the hard disk and data for recovery. The live system is an according option.
â Neobie
Jun 11 at 18:48
Sorry, I quite lost right now, about live system, creating new one, I need to download ubuntu desktop again and install? What is reliable solution to access the hard disk and data for recovery? Can you give instruction step by step from A - Z? Much appreciated. Thanks.
â Syafiq Firdaus
Jun 12 at 14:49
1
@Neobie provided quite good step-by-step instructions. If you do not understand the steps, then backup your data and reinstall.
â user535733
Jun 13 at 3:14
You said you did install Ubuntu 17.04. You usually do this by use of a USB thumb drive, that contains a so called live system and you install from there. So, if you don't have the original one, as you said, you need to download Ubuntu again. You don't need to install it on your hard drive again. You just need to create the live system on a USB thumb drive. Depending on your operating system, you do that by use of some application like USB installer or unetbootin. Once the live system is on your USB thumb drive, you can start your laptop from this live system on your USB thumb drive and ...
â Neobie
Jun 13 at 14:23
Nope, I upgraded it from 17.04, any alternative ideas? Such as any commands that I can type.
â Syafiq Firdaus
Jun 11 at 18:32
Nope, I upgraded it from 17.04, any alternative ideas? Such as any commands that I can type.
â Syafiq Firdaus
Jun 11 at 18:32
Doesn't make any difference. I just thought you might still have your USB live system from your installation. Otherwise, you can use the one from 17.04 too. The live system should be a running system without major error and you can easily sudo su to use the root account to access your hard disk. If you still have the live system from your installation, you can use it. Otherwise the suggestion is, to create a new one. You just need some reliable solution to access the hard disk and data for recovery. The live system is an according option.
â Neobie
Jun 11 at 18:48
Doesn't make any difference. I just thought you might still have your USB live system from your installation. Otherwise, you can use the one from 17.04 too. The live system should be a running system without major error and you can easily sudo su to use the root account to access your hard disk. If you still have the live system from your installation, you can use it. Otherwise the suggestion is, to create a new one. You just need some reliable solution to access the hard disk and data for recovery. The live system is an according option.
â Neobie
Jun 11 at 18:48
Sorry, I quite lost right now, about live system, creating new one, I need to download ubuntu desktop again and install? What is reliable solution to access the hard disk and data for recovery? Can you give instruction step by step from A - Z? Much appreciated. Thanks.
â Syafiq Firdaus
Jun 12 at 14:49
Sorry, I quite lost right now, about live system, creating new one, I need to download ubuntu desktop again and install? What is reliable solution to access the hard disk and data for recovery? Can you give instruction step by step from A - Z? Much appreciated. Thanks.
â Syafiq Firdaus
Jun 12 at 14:49
1
1
@Neobie provided quite good step-by-step instructions. If you do not understand the steps, then backup your data and reinstall.
â user535733
Jun 13 at 3:14
@Neobie provided quite good step-by-step instructions. If you do not understand the steps, then backup your data and reinstall.
â user535733
Jun 13 at 3:14
You said you did install Ubuntu 17.04. You usually do this by use of a USB thumb drive, that contains a so called live system and you install from there. So, if you don't have the original one, as you said, you need to download Ubuntu again. You don't need to install it on your hard drive again. You just need to create the live system on a USB thumb drive. Depending on your operating system, you do that by use of some application like USB installer or unetbootin. Once the live system is on your USB thumb drive, you can start your laptop from this live system on your USB thumb drive and ...
â Neobie
Jun 13 at 14:23
You said you did install Ubuntu 17.04. You usually do this by use of a USB thumb drive, that contains a so called live system and you install from there. So, if you don't have the original one, as you said, you need to download Ubuntu again. You don't need to install it on your hard drive again. You just need to create the live system on a USB thumb drive. Depending on your operating system, you do that by use of some application like USB installer or unetbootin. Once the live system is on your USB thumb drive, you can start your laptop from this live system on your USB thumb drive and ...
â Neobie
Jun 13 at 14:23
 |Â
show 1 more comment
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1045401%2fcannot-sign-in-my-laptop-after-sudo-admin-problem-in-terminal%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
1
You mean you are in an endless log-in loop now after you ran some command using
sudofrom the command line? Whatsudocommand did you run?â WinEunuuchs2Unix
Jun 10 at 20:42
1
@WinEunuuchs2Unix I got endless log in loop after restart my laptop, before restart I did run sudo apt-get update after that command (in the question above).
â Syafiq Firdaus
Jun 10 at 20:50
2
Did you perhaps accidentally move everything in your home directory (including the
.sudo_as_admin_successfulfile) to somewhere else?â steeldriver
Jun 10 at 21:13
Is that a typo or did you put a space after ~ in the actual command?
â mchid
Jun 10 at 21:15
@steeldriver I don't remember
â Syafiq Firdaus
Jun 10 at 21:17