Announcement

Collapse
No announcement yet.

Unable to log in to user account

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Unable to log in to user account

    Hello,

    Here is the problem I have with Kubuntu 12.10. I activated the root account and uses it frequently to do diagnostic and test out stuff ( it is faster for me to not type sudo everytime if I am using root). Other than the root account, I have two user account, one is for myself and one for my sister. Since my sister has bought a new laptop and stop using my computer, I decided to delete her account and also accidentally delete my own account. Not a very smart thing but the mistake has been made and most of the important data is kept on another drive.

    Anyway, I decided to create a new user account for myself while logging in as root. However, here is the problem: after I log out of root and log in to my newly created user account, it won't let me log in. After I type my username and password and click log in, the screen went black, then it kicks me back out to the log in screen. This is definitely not a wrong user/pasword problem. I checked everything to make sure it is not. I even tried to use recovery mode to log in to the user account and the same thing happen. I am currently using Kubuntu with my root account. Everything is working fine with root but there are certain services won't start under root such as Kmail and steam.

    I honestly have no clue how to diagnose this problem, or to get a log of what is wrong. If anybody has any idea what went wrong, please help me out. Thank you so much.

    #2
    Originally posted by visixis View Post
    ( it is faster for me to not type sudo everytime if I am using root)
    You don't really need to activate the root account for that, "sudo -i" will give you a root shell (but I'm not going to dwell on that...your machine, and not directly related to your issues at hand)...just FYI

    Originally posted by visixis View Post
    Anyway, I decided to create a new user account for myself while logging in as root.
    How did you create the account (GUI or command, which command)?

    Originally posted by visixis View Post
    I honestly have no clue how to diagnose this problem, or to get a log of what is wrong.
    Have you checked the user's $HOME/.xsession-errors?

    Comment


      #3
      Sometimes when you create an account as root the .XAuthority file permissions get reset by root and will not allow you to log in. You might try changing permissions chmod 777 /home/user/.Xauthority and see if you can log in after that. Good luck.

      Comment


        #4
        Originally posted by inkrypted View Post
        Sometimes when you create an account as root the .XAuthority file permissions get reset by root and will not allow you to log in. You might try changing permissions chmod 777 /home/user/.Xauthority and see if you can log in after that.
        While that would "work" if user's X-cookie ownership if switched to root (can happen in some situations), it's generally a bad idea with security implications. The default permissions 600 make the most sense (read/writable for owner only). The correct way to "fix" a root owned X-cookie is to change it's ownership back to the user
        Code:
        [sudo] chown <username>:<username> /home/<username>/.Xauthority
        .
        However, it's unlikely that this is the root cause for the issues. The X-cookie should not exist on first login [it will be created during login], and I understood the issue presented itself with the first attempt to login.

        Comment


          #5
          Originally posted by kubicle View Post
          While that would "work" if user's X-cookie ownership if switched to root (can happen in some situations), it's generally a bad idea with security implications. The default permissions 600 make the most sense (read/writable for owner only). The correct way to "fix" a root owned X-cookie is to change it's ownership back to the user
          Code:
          [sudo] chown <username>:<username> /home/<username>/.Xauthority
          .
          However, it's unlikely that this is the root cause for the issues. The X-cookie should not exist on first login [it will be created during login], and I understood the issue presented itself with the first attempt to login.
          Hello,

          I checked the .xsession-errors file and there is 1 line of error. It is below:

          "mkdtemp: private socket dir: Permission denied"

          Is this a permission problem? If it is, should I follow yours or user "inkrypted" instruction on changing ownership. Also, there is a .Xauthority file in the home/user folder. Please let me know.

          Thank you for your help.

          Comment


            #6
            Originally posted by visixis View Post
            I checked the .xsession-errors file and there is 1 line of error. It is below:

            "mkdtemp: private socket dir: Permission denied"

            Is this a permission problem?
            Yes. But there are a few things that could cause that:

            1. Wrong permissions on the /tmp directory (the correct permissions are 1777...or "drwxrwxrwt"):
            You can check those with the command 'ls -ld /tmp' (post the output here, if unsure)

            2. Did you create your new user with the same username as the deleted account? If yes, even though the username may be same the numerical uid is likely different (and file/directory ownership/permissions are based numerical uids, not usernames)...and that can cause (fixable) ownership/permission problems if there are residue files/directories belonging to the old uid#

            You should check that /tmp doesn't have user directories belonging to the deleted uid and also check the $HOME directory if you did not delete it when you deleted the account...you can do these with the following commands (post the output of these here as well, if you are unsure): 'ls -la /tmp' and 'ls -la /var/tmp' and 'ls -la /home/<username>' (replace <username> with the actual username).
            Last edited by kubicle; Jul 01, 2013, 01:34 AM.

            Comment


              #7
              Originally posted by kubicle View Post
              Yes. But there are a few things that could cause that:

              1. Wrong permissions on the /tmp directory (the correct permissions are 1777...or "drwxrwxrwt"):
              You can check those with the command 'ls -ld /tmp' (post the output here, if unsure)

              2. Did you create your new user with the same username as the deleted account? If yes, even though the username may be same the numerical uid is likely different (and file/directory ownership/permissions are based numerical uids, not usernames)...and that can cause (fixable) ownership/permission problems if there are residue files/directories belonging to the old uid#

              You should check that /tmp doesn't have user directories belonging to the deleted uid and also check the $HOME directory if you did not delete it when you deleted the account...you can do these with the following commands (post the output of these here as well, if you are unsure): 'ls -la /tmp' and 'ls -la /var/tmp' and 'ls -la /home/<username>' (replace <username> with the actual username).
              Hello,

              Sorry for the late reply. I was able to fix the login problem. Yes, you were correct. I have the wrong permission for /tmp folder. I proceed to change permission of the folder to 1777 and everything works. I was able to login and set up my normal user account. The problem has been solved.

              Thank you for your help

              Comment

              Working...
              X