Cannot sign in my laptop after sudo admin problem in terminal

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP








up vote
0
down vote

favorite
1












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:/$






share|improve this question

















  • 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






  • 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_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










  • @steeldriver I don't remember
    – Syafiq Firdaus
    Jun 10 at 21:17















up vote
0
down vote

favorite
1












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:/$






share|improve this question

















  • 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






  • 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_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










  • @steeldriver I don't remember
    – Syafiq Firdaus
    Jun 10 at 21:17













up vote
0
down vote

favorite
1









up vote
0
down vote

favorite
1






1





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:/$






share|improve this question













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:/$








share|improve this question












share|improve this question




share|improve this question








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 using sudo from the command line? What sudo command 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_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










  • @steeldriver I don't remember
    – Syafiq Firdaus
    Jun 10 at 21:17













  • 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






  • 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_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










  • @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











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.






share|improve this answer























  • 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










Your Answer







StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "89"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);








 

draft saved


draft discarded


















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






























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.






share|improve this answer























  • 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














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.






share|improve this answer























  • 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












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.






share|improve this answer















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.







share|improve this answer















share|improve this answer



share|improve this answer








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
















  • 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












 

draft saved


draft discarded


























 


draft saved


draft discarded














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













































































Popular posts from this blog

Unable to execute new pre-installation script (/var/lib/dpkg/tmp.ci/preinst)

Running the scala interactive shell from the command line

Do not install recommended packages of dependencies