Cannot login to newly created user accountuser created unable to loginRun script after switching user account “to the same account”Multiple User Account bit-torrent clientHow to prevent “Switch User Account” in Ubuntu 12.04 from logging me out?How to disable password prompt for switching users in graphical session?How to add user from guest user?Unable to create and delete an user account in the PCI'm unable to add password to newly created userUbuntu cannot switch userUbuntu 14.04: New user created from command line has missing features
Are there any tricks to pushing a grand piano?
Maintaining distance
How to catch creatures that can predict the next few minutes?
Found a minor bug, affecting 1% of users. What should QA do?
Does SQL Server's serializable isolation level lock entire table
What benefits are there to blocking most search engines?
In what sense is SL(2,q) "very far from abelian"?
In 1700s, why was 'books that never read' grammatical?
how would i use rm to delete all files without certain wildcard?
How to get a smooth, uniform ParametricPlot of a 2D Region?
Redirect output on-the-fly - looks not possible in Linux, why?
Did the Soviet army intentionally send troops (e.g. penal battalions) running over minefields?
Has a hard SciFi story addressed launching from Venus and its high-density atmosphere, especially after 1967?
Is insurance company’s preferred auto shop biased?
Does it require less energy to reach the Sun from Pluto's orbit than from Earth's orbit?
SHA3-255, one bit less
Quote to show students don't have to fear making mistakes
Would we have more than 8 minutes of light, if the sun "went out"?
Bash-script as linux-service won't run, but executed from terminal works perfectly
How to accompany with piano in latin music when given only chords?
Why is my vegetable stock bitter, but the chicken stock not?
Does Hogwarts have its own anthem?
Advices to added homemade symbols
Tikz diagonal filling pattern
Cannot login to newly created user account
user created unable to loginRun script after switching user account “to the same account”Multiple User Account bit-torrent clientHow to prevent “Switch User Account” in Ubuntu 12.04 from logging me out?How to disable password prompt for switching users in graphical session?How to add user from guest user?Unable to create and delete an user account in the PCI'm unable to add password to newly created userUbuntu cannot switch userUbuntu 14.04: New user created from command line has missing features
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty
margin-bottom:0;
Trying to switch accounts to my newly created account I get a black screen and then it takes me back to the main login screen after entering the correct password.
Upon logging into my previously existing account I get:
"System Program Problem Detected"
Details:
Executable path /usr/bin/Xorg
Package: xserver-xorg-core 2:1.11.4-0ubuntu10.1
Details: Crash
... (tons more, but no way to copy paste or save)
When I try to su
su -l penner
I get:
No directory, logging in with HOME=/
I manually created the home directory and this error goes away but still no luck with the login. Seems something has gone wrong with the user creation? How can I correct this?
useradd switch-user
add a comment
|
Trying to switch accounts to my newly created account I get a black screen and then it takes me back to the main login screen after entering the correct password.
Upon logging into my previously existing account I get:
"System Program Problem Detected"
Details:
Executable path /usr/bin/Xorg
Package: xserver-xorg-core 2:1.11.4-0ubuntu10.1
Details: Crash
... (tons more, but no way to copy paste or save)
When I try to su
su -l penner
I get:
No directory, logging in with HOME=/
I manually created the home directory and this error goes away but still no luck with the login. Seems something has gone wrong with the user creation? How can I correct this?
useradd switch-user
How did you create the user account? Did you do it from the gui, or from command line? If you do it from command line, you need to be aware that adduser and useradd do things very differently. Also, it kinda seems like the files from /etc/skel weren't copied over. Could you please ls -al on your home dir and in the new user's dir so we can see what's going on?
– SuperMatt
Jul 5 '12 at 9:49
add a comment
|
Trying to switch accounts to my newly created account I get a black screen and then it takes me back to the main login screen after entering the correct password.
Upon logging into my previously existing account I get:
"System Program Problem Detected"
Details:
Executable path /usr/bin/Xorg
Package: xserver-xorg-core 2:1.11.4-0ubuntu10.1
Details: Crash
... (tons more, but no way to copy paste or save)
When I try to su
su -l penner
I get:
No directory, logging in with HOME=/
I manually created the home directory and this error goes away but still no luck with the login. Seems something has gone wrong with the user creation? How can I correct this?
useradd switch-user
Trying to switch accounts to my newly created account I get a black screen and then it takes me back to the main login screen after entering the correct password.
Upon logging into my previously existing account I get:
"System Program Problem Detected"
Details:
Executable path /usr/bin/Xorg
Package: xserver-xorg-core 2:1.11.4-0ubuntu10.1
Details: Crash
... (tons more, but no way to copy paste or save)
When I try to su
su -l penner
I get:
No directory, logging in with HOME=/
I manually created the home directory and this error goes away but still no luck with the login. Seems something has gone wrong with the user creation? How can I correct this?
useradd switch-user
useradd switch-user
edited Nov 6 '17 at 8:05
muru
1
1
asked Jul 5 '12 at 8:38
pennerpenner
3911 gold badge5 silver badges14 bronze badges
3911 gold badge5 silver badges14 bronze badges
How did you create the user account? Did you do it from the gui, or from command line? If you do it from command line, you need to be aware that adduser and useradd do things very differently. Also, it kinda seems like the files from /etc/skel weren't copied over. Could you please ls -al on your home dir and in the new user's dir so we can see what's going on?
– SuperMatt
Jul 5 '12 at 9:49
add a comment
|
How did you create the user account? Did you do it from the gui, or from command line? If you do it from command line, you need to be aware that adduser and useradd do things very differently. Also, it kinda seems like the files from /etc/skel weren't copied over. Could you please ls -al on your home dir and in the new user's dir so we can see what's going on?
– SuperMatt
Jul 5 '12 at 9:49
How did you create the user account? Did you do it from the gui, or from command line? If you do it from command line, you need to be aware that adduser and useradd do things very differently. Also, it kinda seems like the files from /etc/skel weren't copied over. Could you please ls -al on your home dir and in the new user's dir so we can see what's going on?
– SuperMatt
Jul 5 '12 at 9:49
How did you create the user account? Did you do it from the gui, or from command line? If you do it from command line, you need to be aware that adduser and useradd do things very differently. Also, it kinda seems like the files from /etc/skel weren't copied over. Could you please ls -al on your home dir and in the new user's dir so we can see what's going on?
– SuperMatt
Jul 5 '12 at 9:49
add a comment
|
3 Answers
3
active
oldest
votes
If you created the user account with useradd, you have to set up everything for it manually. This is why, when creating user accounts from the command-line, it is recommended to use adduser in Ubuntu (and Debian, and other Debian-based systems) instead. You might just want to remove the user with userdel or deluser and recreate it with adduser. Otherwise...
Fixing the Home Directory Location
If you want to keep the user account and fix the problem, then you need to look at:
- the name of the home directory the user account is actually configured for
- the name of the directory you actually created
These must be exactly the same. The error message you get with su -l penner is telling you that they are not the same.
To check the home directory the user account is actually configured for, run this command (see man 5 passwd and man grep for more information):
grep penner /etc/passwd
You should see a line like this:
penner:x:1000:1000:Eliah Kagan,,,:/home/penner:/bin/bash
That is, the sixth :-separated field (after the fifth :) contains the home directory. If it's not /home/penner, it should be. If the directory you created for the user is not /home/penner, it should be, too. If the two directories are the same but neither one is /home/penner, then that might theoretically work, but you should make them both /home/penner, because lots of software assumes that all non-root users' home directories are /home/username.
You can change penner's home directory to /home/penner by running this command:
sudo usermod -d /home/penner penner
- See
man usermodfor more information.
Ensuring it is a Directory, and that the User Has Access
If (or once) the names are both /home/penner, you should also make sure that the user has access to their own home directory. Run:
ls -ld /home/penner
You should see something that looks like this (though the date and time will be different):
drwxr-xr-x 43 penner penner 4096 2012-07-03 06:41 /home/penner
If instead of drwxr-xr-x, you have something that starts with - rather than d, then you created a file rather than a directory. Delete the file and make a directory there instead.
If instead of the first penner you have something else, then the user doesn't own their home directory, so make them own it:
sudo chown penner /home/penner
- See
man chownfor more information.
If instead of drwxr-xr-x there are dashes in the next three characters after the d, then the user doesn't have full access there. Fix that as follows:
sudo chmod u+rwx /home/penner
- See
man chmodfor more information.
(penner is capable of running this command if they own their home directory, so if you prefer, you can run this as: sudo -u penner u+rwx /home/penner)
Ensuring Other Users Don't Have Blanket Write Access
If instead of drwxr-xr-x, there are ws instead of -s in the last six letters, then users besides penner may have write access to penner's home directory. This is dangerous (unless you really know what you're doing and want it this way and have set things up so it won't be a problem). To fix it:
sudo chmod -R go-w /home/penner
Other Defaults
There are some other changes you may want to make. By default in Ubuntu (that is, if you create a user account with adduser or with a graphical tool, which you did not):
Home directories have read and write permissions for everyone, not just the user who owns them. Users can change this, either for the whole home directory or any files and subdirectories inside it. But if you do want this default, and you don't have the second and third
randxindrwxr-xr-x, run:sudo chmod 755 /home/penner(
penneris capable of running this command if they own their home directory, so if you prefer, you can run this as:sudo -u penner chmod 755 /home/penner)Each user has his/her own group, with the same name as the user, and this is the user's primary group. Their home directory is owned by this group. That's the meaning of the second
pennerindrwxr-xr-x 43 penner penner 4096 2012-07-03 06:41 /home/penner. It's OK to break with this default, if you know what you are doing. But if it's not your intention to do things differently, you should make surepenneris set up this way, since some possible primary group identities for a user, or group owners on the user's home directory, could lead to security problems.Run
groups penner. (Seeman groupsfor more information.) You should see something like this:penner : penner adm dialout cdrom plugdev lpadmin sambashareDon't worry if it's not quite like that. I'll get to that soon. Instead, look at the first word after the
:. That's the name of the user's primary group. Assuming you want it to bepenner, make sure it is. If it isn't, change it:sudo usermod -g penner pennerIf you get an error saying that the group
pennerdoesn't exist, then you'll have to create it with this command (and then run the above command again):sudo addgroup penner- See
man addgroupfor more information. (If you prefer, you can alternatively use thegroupaddcommand to create groups.)
- See
When you ran
groups penner, you may have gotten a list of groups considerably shorter than mypenner : penner adm dialout cdrom plugdev lpadmin sambashare. For desktop users, theadm,dialout,cdrom,plugdev,lpadmin, andsambashareprovide abilities that desktop users should generally have. Therefore, unless you have a reason to do otherwise,pennershould be in these groups. These are not primary groups, however, so they're set differently. Supposingpenneris not in any of these groups and you wantpennerto be in all of them, run this command:sudo usermod -a -G adm,dialout,plugdev,lpadmin,sambashare pennerIn case you're interested, here's what all those groups mean:
admusers can view most system log files in/var/log.dialoutusers can use dial-up modems.plugdevusers can mount and use external storage devices.lpadminusers can set up and manage printers.sambashareusers can share files (via Samba) with other computers over a network.
(Source: Privileges, in the Ubuntu documentation wiki.)
Making the User an Administrator
If you don't want penner to be an administrator, you probably don't need to do anything else. You can check if penner is an administrator with groups penner. If neither admin nor sudo is listed, then penner is not an administrator.
If you want penner to be an administrator, add penner to whichever of these groups exists. (You may as well add penner to both, if they both exist.) You can accomplish that by running these two commands separately--if either one succeeds, you've made penner an administrator:
sudo usermod -a -G admin penner
sudo usermod -a -G sudo penner
- The reason there are two groups is that, before Ubuntu 12.04 LTS, administrators were in the
admingroup. Starting with Ubuntu 12.04 LTS, administrators are in thesudogroup. But if your 12.04 LTS system is upgraded from a previous release (and this should apply to later Ubuntu releases, such as 12.10 when it comes out, that are upgraded from Ubuntu 11.10 or earlier), then for backward compatibility, administrators are members of bothsudoandadmin. Generally, if one of these groups doesn't confer administrative abilities, it simply doesn't exist, so running both the above two commands (separately, not assudo usermod -a -G admin,sudo penner) is generally a safe and effective way to makepenneran administrator.
Thanks! Something like adduser is nice but I like to know how to do things manually as well. A very thorough answer! I really appreciate it.
– penner
Jul 5 '12 at 14:37
sudo chmod u+a /home/pennergives an error on Ubuntu 16.04 (Xenial). Issudo chmod u+rw /home/pennera proper replacement?
– Nickolai Leschov
Apr 14 '16 at 13:51
@NickolaiLeschov Sorry about that--and thanks for pointing out the error! I've fixed the command.
– Eliah Kagan
Jun 21 '16 at 6:13
this is just dumb, why not removeuseraddthen? keeping random broken code
– dashesy
Oct 25 '16 at 16:19
1
@dashesy Thanks--I was not aware that usinguseraddcauses problems on Ubuntu that it doesn't cause on other systems. On my 16.04 system,/etc/default/useraddhas (as its only uncommented line)SHELL=/bin/sh, and useradd(8) seems to say that theSHELLvalue there is used if the-s/--shellflag isn't given, but on my 16.04 system that doesn't happen. I was wrong to say so hastily that Ubuntu'suseraddisn't broken. Now I'm not so sure. Maybe there's a good reason for this difference between Fedora and Debian (and Ubuntu)... but I've deleted my comment so as not to mislead people.
– Eliah Kagan
Dec 27 '16 at 20:59
|
show 1 more comment
This mostly happens when you create the user without creating a home directory for the user. This can be solved by using this command when creating user
useradd -m the_username
The -m flag is what creates the home directory for the user. After creating the user check if the home directory exists for that user by doing
ls /home
If you can see that username listed there then the last thing to do is assign a password to that user
passwd the_username
You can now login with that username and password
add a comment
|
ctrl+alt+f1 and login there and run
sudo chown -R $USER:$USER $HOME
then press ctrl+alt+f7 and try to login
It will work
add a comment
|
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',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/4.0/"u003ecc by-sa 4.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f159878%2fcannot-login-to-newly-created-user-account%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
If you created the user account with useradd, you have to set up everything for it manually. This is why, when creating user accounts from the command-line, it is recommended to use adduser in Ubuntu (and Debian, and other Debian-based systems) instead. You might just want to remove the user with userdel or deluser and recreate it with adduser. Otherwise...
Fixing the Home Directory Location
If you want to keep the user account and fix the problem, then you need to look at:
- the name of the home directory the user account is actually configured for
- the name of the directory you actually created
These must be exactly the same. The error message you get with su -l penner is telling you that they are not the same.
To check the home directory the user account is actually configured for, run this command (see man 5 passwd and man grep for more information):
grep penner /etc/passwd
You should see a line like this:
penner:x:1000:1000:Eliah Kagan,,,:/home/penner:/bin/bash
That is, the sixth :-separated field (after the fifth :) contains the home directory. If it's not /home/penner, it should be. If the directory you created for the user is not /home/penner, it should be, too. If the two directories are the same but neither one is /home/penner, then that might theoretically work, but you should make them both /home/penner, because lots of software assumes that all non-root users' home directories are /home/username.
You can change penner's home directory to /home/penner by running this command:
sudo usermod -d /home/penner penner
- See
man usermodfor more information.
Ensuring it is a Directory, and that the User Has Access
If (or once) the names are both /home/penner, you should also make sure that the user has access to their own home directory. Run:
ls -ld /home/penner
You should see something that looks like this (though the date and time will be different):
drwxr-xr-x 43 penner penner 4096 2012-07-03 06:41 /home/penner
If instead of drwxr-xr-x, you have something that starts with - rather than d, then you created a file rather than a directory. Delete the file and make a directory there instead.
If instead of the first penner you have something else, then the user doesn't own their home directory, so make them own it:
sudo chown penner /home/penner
- See
man chownfor more information.
If instead of drwxr-xr-x there are dashes in the next three characters after the d, then the user doesn't have full access there. Fix that as follows:
sudo chmod u+rwx /home/penner
- See
man chmodfor more information.
(penner is capable of running this command if they own their home directory, so if you prefer, you can run this as: sudo -u penner u+rwx /home/penner)
Ensuring Other Users Don't Have Blanket Write Access
If instead of drwxr-xr-x, there are ws instead of -s in the last six letters, then users besides penner may have write access to penner's home directory. This is dangerous (unless you really know what you're doing and want it this way and have set things up so it won't be a problem). To fix it:
sudo chmod -R go-w /home/penner
Other Defaults
There are some other changes you may want to make. By default in Ubuntu (that is, if you create a user account with adduser or with a graphical tool, which you did not):
Home directories have read and write permissions for everyone, not just the user who owns them. Users can change this, either for the whole home directory or any files and subdirectories inside it. But if you do want this default, and you don't have the second and third
randxindrwxr-xr-x, run:sudo chmod 755 /home/penner(
penneris capable of running this command if they own their home directory, so if you prefer, you can run this as:sudo -u penner chmod 755 /home/penner)Each user has his/her own group, with the same name as the user, and this is the user's primary group. Their home directory is owned by this group. That's the meaning of the second
pennerindrwxr-xr-x 43 penner penner 4096 2012-07-03 06:41 /home/penner. It's OK to break with this default, if you know what you are doing. But if it's not your intention to do things differently, you should make surepenneris set up this way, since some possible primary group identities for a user, or group owners on the user's home directory, could lead to security problems.Run
groups penner. (Seeman groupsfor more information.) You should see something like this:penner : penner adm dialout cdrom plugdev lpadmin sambashareDon't worry if it's not quite like that. I'll get to that soon. Instead, look at the first word after the
:. That's the name of the user's primary group. Assuming you want it to bepenner, make sure it is. If it isn't, change it:sudo usermod -g penner pennerIf you get an error saying that the group
pennerdoesn't exist, then you'll have to create it with this command (and then run the above command again):sudo addgroup penner- See
man addgroupfor more information. (If you prefer, you can alternatively use thegroupaddcommand to create groups.)
- See
When you ran
groups penner, you may have gotten a list of groups considerably shorter than mypenner : penner adm dialout cdrom plugdev lpadmin sambashare. For desktop users, theadm,dialout,cdrom,plugdev,lpadmin, andsambashareprovide abilities that desktop users should generally have. Therefore, unless you have a reason to do otherwise,pennershould be in these groups. These are not primary groups, however, so they're set differently. Supposingpenneris not in any of these groups and you wantpennerto be in all of them, run this command:sudo usermod -a -G adm,dialout,plugdev,lpadmin,sambashare pennerIn case you're interested, here's what all those groups mean:
admusers can view most system log files in/var/log.dialoutusers can use dial-up modems.plugdevusers can mount and use external storage devices.lpadminusers can set up and manage printers.sambashareusers can share files (via Samba) with other computers over a network.
(Source: Privileges, in the Ubuntu documentation wiki.)
Making the User an Administrator
If you don't want penner to be an administrator, you probably don't need to do anything else. You can check if penner is an administrator with groups penner. If neither admin nor sudo is listed, then penner is not an administrator.
If you want penner to be an administrator, add penner to whichever of these groups exists. (You may as well add penner to both, if they both exist.) You can accomplish that by running these two commands separately--if either one succeeds, you've made penner an administrator:
sudo usermod -a -G admin penner
sudo usermod -a -G sudo penner
- The reason there are two groups is that, before Ubuntu 12.04 LTS, administrators were in the
admingroup. Starting with Ubuntu 12.04 LTS, administrators are in thesudogroup. But if your 12.04 LTS system is upgraded from a previous release (and this should apply to later Ubuntu releases, such as 12.10 when it comes out, that are upgraded from Ubuntu 11.10 or earlier), then for backward compatibility, administrators are members of bothsudoandadmin. Generally, if one of these groups doesn't confer administrative abilities, it simply doesn't exist, so running both the above two commands (separately, not assudo usermod -a -G admin,sudo penner) is generally a safe and effective way to makepenneran administrator.
Thanks! Something like adduser is nice but I like to know how to do things manually as well. A very thorough answer! I really appreciate it.
– penner
Jul 5 '12 at 14:37
sudo chmod u+a /home/pennergives an error on Ubuntu 16.04 (Xenial). Issudo chmod u+rw /home/pennera proper replacement?
– Nickolai Leschov
Apr 14 '16 at 13:51
@NickolaiLeschov Sorry about that--and thanks for pointing out the error! I've fixed the command.
– Eliah Kagan
Jun 21 '16 at 6:13
this is just dumb, why not removeuseraddthen? keeping random broken code
– dashesy
Oct 25 '16 at 16:19
1
@dashesy Thanks--I was not aware that usinguseraddcauses problems on Ubuntu that it doesn't cause on other systems. On my 16.04 system,/etc/default/useraddhas (as its only uncommented line)SHELL=/bin/sh, and useradd(8) seems to say that theSHELLvalue there is used if the-s/--shellflag isn't given, but on my 16.04 system that doesn't happen. I was wrong to say so hastily that Ubuntu'suseraddisn't broken. Now I'm not so sure. Maybe there's a good reason for this difference between Fedora and Debian (and Ubuntu)... but I've deleted my comment so as not to mislead people.
– Eliah Kagan
Dec 27 '16 at 20:59
|
show 1 more comment
If you created the user account with useradd, you have to set up everything for it manually. This is why, when creating user accounts from the command-line, it is recommended to use adduser in Ubuntu (and Debian, and other Debian-based systems) instead. You might just want to remove the user with userdel or deluser and recreate it with adduser. Otherwise...
Fixing the Home Directory Location
If you want to keep the user account and fix the problem, then you need to look at:
- the name of the home directory the user account is actually configured for
- the name of the directory you actually created
These must be exactly the same. The error message you get with su -l penner is telling you that they are not the same.
To check the home directory the user account is actually configured for, run this command (see man 5 passwd and man grep for more information):
grep penner /etc/passwd
You should see a line like this:
penner:x:1000:1000:Eliah Kagan,,,:/home/penner:/bin/bash
That is, the sixth :-separated field (after the fifth :) contains the home directory. If it's not /home/penner, it should be. If the directory you created for the user is not /home/penner, it should be, too. If the two directories are the same but neither one is /home/penner, then that might theoretically work, but you should make them both /home/penner, because lots of software assumes that all non-root users' home directories are /home/username.
You can change penner's home directory to /home/penner by running this command:
sudo usermod -d /home/penner penner
- See
man usermodfor more information.
Ensuring it is a Directory, and that the User Has Access
If (or once) the names are both /home/penner, you should also make sure that the user has access to their own home directory. Run:
ls -ld /home/penner
You should see something that looks like this (though the date and time will be different):
drwxr-xr-x 43 penner penner 4096 2012-07-03 06:41 /home/penner
If instead of drwxr-xr-x, you have something that starts with - rather than d, then you created a file rather than a directory. Delete the file and make a directory there instead.
If instead of the first penner you have something else, then the user doesn't own their home directory, so make them own it:
sudo chown penner /home/penner
- See
man chownfor more information.
If instead of drwxr-xr-x there are dashes in the next three characters after the d, then the user doesn't have full access there. Fix that as follows:
sudo chmod u+rwx /home/penner
- See
man chmodfor more information.
(penner is capable of running this command if they own their home directory, so if you prefer, you can run this as: sudo -u penner u+rwx /home/penner)
Ensuring Other Users Don't Have Blanket Write Access
If instead of drwxr-xr-x, there are ws instead of -s in the last six letters, then users besides penner may have write access to penner's home directory. This is dangerous (unless you really know what you're doing and want it this way and have set things up so it won't be a problem). To fix it:
sudo chmod -R go-w /home/penner
Other Defaults
There are some other changes you may want to make. By default in Ubuntu (that is, if you create a user account with adduser or with a graphical tool, which you did not):
Home directories have read and write permissions for everyone, not just the user who owns them. Users can change this, either for the whole home directory or any files and subdirectories inside it. But if you do want this default, and you don't have the second and third
randxindrwxr-xr-x, run:sudo chmod 755 /home/penner(
penneris capable of running this command if they own their home directory, so if you prefer, you can run this as:sudo -u penner chmod 755 /home/penner)Each user has his/her own group, with the same name as the user, and this is the user's primary group. Their home directory is owned by this group. That's the meaning of the second
pennerindrwxr-xr-x 43 penner penner 4096 2012-07-03 06:41 /home/penner. It's OK to break with this default, if you know what you are doing. But if it's not your intention to do things differently, you should make surepenneris set up this way, since some possible primary group identities for a user, or group owners on the user's home directory, could lead to security problems.Run
groups penner. (Seeman groupsfor more information.) You should see something like this:penner : penner adm dialout cdrom plugdev lpadmin sambashareDon't worry if it's not quite like that. I'll get to that soon. Instead, look at the first word after the
:. That's the name of the user's primary group. Assuming you want it to bepenner, make sure it is. If it isn't, change it:sudo usermod -g penner pennerIf you get an error saying that the group
pennerdoesn't exist, then you'll have to create it with this command (and then run the above command again):sudo addgroup penner- See
man addgroupfor more information. (If you prefer, you can alternatively use thegroupaddcommand to create groups.)
- See
When you ran
groups penner, you may have gotten a list of groups considerably shorter than mypenner : penner adm dialout cdrom plugdev lpadmin sambashare. For desktop users, theadm,dialout,cdrom,plugdev,lpadmin, andsambashareprovide abilities that desktop users should generally have. Therefore, unless you have a reason to do otherwise,pennershould be in these groups. These are not primary groups, however, so they're set differently. Supposingpenneris not in any of these groups and you wantpennerto be in all of them, run this command:sudo usermod -a -G adm,dialout,plugdev,lpadmin,sambashare pennerIn case you're interested, here's what all those groups mean:
admusers can view most system log files in/var/log.dialoutusers can use dial-up modems.plugdevusers can mount and use external storage devices.lpadminusers can set up and manage printers.sambashareusers can share files (via Samba) with other computers over a network.
(Source: Privileges, in the Ubuntu documentation wiki.)
Making the User an Administrator
If you don't want penner to be an administrator, you probably don't need to do anything else. You can check if penner is an administrator with groups penner. If neither admin nor sudo is listed, then penner is not an administrator.
If you want penner to be an administrator, add penner to whichever of these groups exists. (You may as well add penner to both, if they both exist.) You can accomplish that by running these two commands separately--if either one succeeds, you've made penner an administrator:
sudo usermod -a -G admin penner
sudo usermod -a -G sudo penner
- The reason there are two groups is that, before Ubuntu 12.04 LTS, administrators were in the
admingroup. Starting with Ubuntu 12.04 LTS, administrators are in thesudogroup. But if your 12.04 LTS system is upgraded from a previous release (and this should apply to later Ubuntu releases, such as 12.10 when it comes out, that are upgraded from Ubuntu 11.10 or earlier), then for backward compatibility, administrators are members of bothsudoandadmin. Generally, if one of these groups doesn't confer administrative abilities, it simply doesn't exist, so running both the above two commands (separately, not assudo usermod -a -G admin,sudo penner) is generally a safe and effective way to makepenneran administrator.
Thanks! Something like adduser is nice but I like to know how to do things manually as well. A very thorough answer! I really appreciate it.
– penner
Jul 5 '12 at 14:37
sudo chmod u+a /home/pennergives an error on Ubuntu 16.04 (Xenial). Issudo chmod u+rw /home/pennera proper replacement?
– Nickolai Leschov
Apr 14 '16 at 13:51
@NickolaiLeschov Sorry about that--and thanks for pointing out the error! I've fixed the command.
– Eliah Kagan
Jun 21 '16 at 6:13
this is just dumb, why not removeuseraddthen? keeping random broken code
– dashesy
Oct 25 '16 at 16:19
1
@dashesy Thanks--I was not aware that usinguseraddcauses problems on Ubuntu that it doesn't cause on other systems. On my 16.04 system,/etc/default/useraddhas (as its only uncommented line)SHELL=/bin/sh, and useradd(8) seems to say that theSHELLvalue there is used if the-s/--shellflag isn't given, but on my 16.04 system that doesn't happen. I was wrong to say so hastily that Ubuntu'suseraddisn't broken. Now I'm not so sure. Maybe there's a good reason for this difference between Fedora and Debian (and Ubuntu)... but I've deleted my comment so as not to mislead people.
– Eliah Kagan
Dec 27 '16 at 20:59
|
show 1 more comment
If you created the user account with useradd, you have to set up everything for it manually. This is why, when creating user accounts from the command-line, it is recommended to use adduser in Ubuntu (and Debian, and other Debian-based systems) instead. You might just want to remove the user with userdel or deluser and recreate it with adduser. Otherwise...
Fixing the Home Directory Location
If you want to keep the user account and fix the problem, then you need to look at:
- the name of the home directory the user account is actually configured for
- the name of the directory you actually created
These must be exactly the same. The error message you get with su -l penner is telling you that they are not the same.
To check the home directory the user account is actually configured for, run this command (see man 5 passwd and man grep for more information):
grep penner /etc/passwd
You should see a line like this:
penner:x:1000:1000:Eliah Kagan,,,:/home/penner:/bin/bash
That is, the sixth :-separated field (after the fifth :) contains the home directory. If it's not /home/penner, it should be. If the directory you created for the user is not /home/penner, it should be, too. If the two directories are the same but neither one is /home/penner, then that might theoretically work, but you should make them both /home/penner, because lots of software assumes that all non-root users' home directories are /home/username.
You can change penner's home directory to /home/penner by running this command:
sudo usermod -d /home/penner penner
- See
man usermodfor more information.
Ensuring it is a Directory, and that the User Has Access
If (or once) the names are both /home/penner, you should also make sure that the user has access to their own home directory. Run:
ls -ld /home/penner
You should see something that looks like this (though the date and time will be different):
drwxr-xr-x 43 penner penner 4096 2012-07-03 06:41 /home/penner
If instead of drwxr-xr-x, you have something that starts with - rather than d, then you created a file rather than a directory. Delete the file and make a directory there instead.
If instead of the first penner you have something else, then the user doesn't own their home directory, so make them own it:
sudo chown penner /home/penner
- See
man chownfor more information.
If instead of drwxr-xr-x there are dashes in the next three characters after the d, then the user doesn't have full access there. Fix that as follows:
sudo chmod u+rwx /home/penner
- See
man chmodfor more information.
(penner is capable of running this command if they own their home directory, so if you prefer, you can run this as: sudo -u penner u+rwx /home/penner)
Ensuring Other Users Don't Have Blanket Write Access
If instead of drwxr-xr-x, there are ws instead of -s in the last six letters, then users besides penner may have write access to penner's home directory. This is dangerous (unless you really know what you're doing and want it this way and have set things up so it won't be a problem). To fix it:
sudo chmod -R go-w /home/penner
Other Defaults
There are some other changes you may want to make. By default in Ubuntu (that is, if you create a user account with adduser or with a graphical tool, which you did not):
Home directories have read and write permissions for everyone, not just the user who owns them. Users can change this, either for the whole home directory or any files and subdirectories inside it. But if you do want this default, and you don't have the second and third
randxindrwxr-xr-x, run:sudo chmod 755 /home/penner(
penneris capable of running this command if they own their home directory, so if you prefer, you can run this as:sudo -u penner chmod 755 /home/penner)Each user has his/her own group, with the same name as the user, and this is the user's primary group. Their home directory is owned by this group. That's the meaning of the second
pennerindrwxr-xr-x 43 penner penner 4096 2012-07-03 06:41 /home/penner. It's OK to break with this default, if you know what you are doing. But if it's not your intention to do things differently, you should make surepenneris set up this way, since some possible primary group identities for a user, or group owners on the user's home directory, could lead to security problems.Run
groups penner. (Seeman groupsfor more information.) You should see something like this:penner : penner adm dialout cdrom plugdev lpadmin sambashareDon't worry if it's not quite like that. I'll get to that soon. Instead, look at the first word after the
:. That's the name of the user's primary group. Assuming you want it to bepenner, make sure it is. If it isn't, change it:sudo usermod -g penner pennerIf you get an error saying that the group
pennerdoesn't exist, then you'll have to create it with this command (and then run the above command again):sudo addgroup penner- See
man addgroupfor more information. (If you prefer, you can alternatively use thegroupaddcommand to create groups.)
- See
When you ran
groups penner, you may have gotten a list of groups considerably shorter than mypenner : penner adm dialout cdrom plugdev lpadmin sambashare. For desktop users, theadm,dialout,cdrom,plugdev,lpadmin, andsambashareprovide abilities that desktop users should generally have. Therefore, unless you have a reason to do otherwise,pennershould be in these groups. These are not primary groups, however, so they're set differently. Supposingpenneris not in any of these groups and you wantpennerto be in all of them, run this command:sudo usermod -a -G adm,dialout,plugdev,lpadmin,sambashare pennerIn case you're interested, here's what all those groups mean:
admusers can view most system log files in/var/log.dialoutusers can use dial-up modems.plugdevusers can mount and use external storage devices.lpadminusers can set up and manage printers.sambashareusers can share files (via Samba) with other computers over a network.
(Source: Privileges, in the Ubuntu documentation wiki.)
Making the User an Administrator
If you don't want penner to be an administrator, you probably don't need to do anything else. You can check if penner is an administrator with groups penner. If neither admin nor sudo is listed, then penner is not an administrator.
If you want penner to be an administrator, add penner to whichever of these groups exists. (You may as well add penner to both, if they both exist.) You can accomplish that by running these two commands separately--if either one succeeds, you've made penner an administrator:
sudo usermod -a -G admin penner
sudo usermod -a -G sudo penner
- The reason there are two groups is that, before Ubuntu 12.04 LTS, administrators were in the
admingroup. Starting with Ubuntu 12.04 LTS, administrators are in thesudogroup. But if your 12.04 LTS system is upgraded from a previous release (and this should apply to later Ubuntu releases, such as 12.10 when it comes out, that are upgraded from Ubuntu 11.10 or earlier), then for backward compatibility, administrators are members of bothsudoandadmin. Generally, if one of these groups doesn't confer administrative abilities, it simply doesn't exist, so running both the above two commands (separately, not assudo usermod -a -G admin,sudo penner) is generally a safe and effective way to makepenneran administrator.
If you created the user account with useradd, you have to set up everything for it manually. This is why, when creating user accounts from the command-line, it is recommended to use adduser in Ubuntu (and Debian, and other Debian-based systems) instead. You might just want to remove the user with userdel or deluser and recreate it with adduser. Otherwise...
Fixing the Home Directory Location
If you want to keep the user account and fix the problem, then you need to look at:
- the name of the home directory the user account is actually configured for
- the name of the directory you actually created
These must be exactly the same. The error message you get with su -l penner is telling you that they are not the same.
To check the home directory the user account is actually configured for, run this command (see man 5 passwd and man grep for more information):
grep penner /etc/passwd
You should see a line like this:
penner:x:1000:1000:Eliah Kagan,,,:/home/penner:/bin/bash
That is, the sixth :-separated field (after the fifth :) contains the home directory. If it's not /home/penner, it should be. If the directory you created for the user is not /home/penner, it should be, too. If the two directories are the same but neither one is /home/penner, then that might theoretically work, but you should make them both /home/penner, because lots of software assumes that all non-root users' home directories are /home/username.
You can change penner's home directory to /home/penner by running this command:
sudo usermod -d /home/penner penner
- See
man usermodfor more information.
Ensuring it is a Directory, and that the User Has Access
If (or once) the names are both /home/penner, you should also make sure that the user has access to their own home directory. Run:
ls -ld /home/penner
You should see something that looks like this (though the date and time will be different):
drwxr-xr-x 43 penner penner 4096 2012-07-03 06:41 /home/penner
If instead of drwxr-xr-x, you have something that starts with - rather than d, then you created a file rather than a directory. Delete the file and make a directory there instead.
If instead of the first penner you have something else, then the user doesn't own their home directory, so make them own it:
sudo chown penner /home/penner
- See
man chownfor more information.
If instead of drwxr-xr-x there are dashes in the next three characters after the d, then the user doesn't have full access there. Fix that as follows:
sudo chmod u+rwx /home/penner
- See
man chmodfor more information.
(penner is capable of running this command if they own their home directory, so if you prefer, you can run this as: sudo -u penner u+rwx /home/penner)
Ensuring Other Users Don't Have Blanket Write Access
If instead of drwxr-xr-x, there are ws instead of -s in the last six letters, then users besides penner may have write access to penner's home directory. This is dangerous (unless you really know what you're doing and want it this way and have set things up so it won't be a problem). To fix it:
sudo chmod -R go-w /home/penner
Other Defaults
There are some other changes you may want to make. By default in Ubuntu (that is, if you create a user account with adduser or with a graphical tool, which you did not):
Home directories have read and write permissions for everyone, not just the user who owns them. Users can change this, either for the whole home directory or any files and subdirectories inside it. But if you do want this default, and you don't have the second and third
randxindrwxr-xr-x, run:sudo chmod 755 /home/penner(
penneris capable of running this command if they own their home directory, so if you prefer, you can run this as:sudo -u penner chmod 755 /home/penner)Each user has his/her own group, with the same name as the user, and this is the user's primary group. Their home directory is owned by this group. That's the meaning of the second
pennerindrwxr-xr-x 43 penner penner 4096 2012-07-03 06:41 /home/penner. It's OK to break with this default, if you know what you are doing. But if it's not your intention to do things differently, you should make surepenneris set up this way, since some possible primary group identities for a user, or group owners on the user's home directory, could lead to security problems.Run
groups penner. (Seeman groupsfor more information.) You should see something like this:penner : penner adm dialout cdrom plugdev lpadmin sambashareDon't worry if it's not quite like that. I'll get to that soon. Instead, look at the first word after the
:. That's the name of the user's primary group. Assuming you want it to bepenner, make sure it is. If it isn't, change it:sudo usermod -g penner pennerIf you get an error saying that the group
pennerdoesn't exist, then you'll have to create it with this command (and then run the above command again):sudo addgroup penner- See
man addgroupfor more information. (If you prefer, you can alternatively use thegroupaddcommand to create groups.)
- See
When you ran
groups penner, you may have gotten a list of groups considerably shorter than mypenner : penner adm dialout cdrom plugdev lpadmin sambashare. For desktop users, theadm,dialout,cdrom,plugdev,lpadmin, andsambashareprovide abilities that desktop users should generally have. Therefore, unless you have a reason to do otherwise,pennershould be in these groups. These are not primary groups, however, so they're set differently. Supposingpenneris not in any of these groups and you wantpennerto be in all of them, run this command:sudo usermod -a -G adm,dialout,plugdev,lpadmin,sambashare pennerIn case you're interested, here's what all those groups mean:
admusers can view most system log files in/var/log.dialoutusers can use dial-up modems.plugdevusers can mount and use external storage devices.lpadminusers can set up and manage printers.sambashareusers can share files (via Samba) with other computers over a network.
(Source: Privileges, in the Ubuntu documentation wiki.)
Making the User an Administrator
If you don't want penner to be an administrator, you probably don't need to do anything else. You can check if penner is an administrator with groups penner. If neither admin nor sudo is listed, then penner is not an administrator.
If you want penner to be an administrator, add penner to whichever of these groups exists. (You may as well add penner to both, if they both exist.) You can accomplish that by running these two commands separately--if either one succeeds, you've made penner an administrator:
sudo usermod -a -G admin penner
sudo usermod -a -G sudo penner
- The reason there are two groups is that, before Ubuntu 12.04 LTS, administrators were in the
admingroup. Starting with Ubuntu 12.04 LTS, administrators are in thesudogroup. But if your 12.04 LTS system is upgraded from a previous release (and this should apply to later Ubuntu releases, such as 12.10 when it comes out, that are upgraded from Ubuntu 11.10 or earlier), then for backward compatibility, administrators are members of bothsudoandadmin. Generally, if one of these groups doesn't confer administrative abilities, it simply doesn't exist, so running both the above two commands (separately, not assudo usermod -a -G admin,sudo penner) is generally a safe and effective way to makepenneran administrator.
edited Jun 21 '16 at 6:11
answered Jul 5 '12 at 9:48
Eliah KaganEliah Kagan
90.7k23 gold badges250 silver badges396 bronze badges
90.7k23 gold badges250 silver badges396 bronze badges
Thanks! Something like adduser is nice but I like to know how to do things manually as well. A very thorough answer! I really appreciate it.
– penner
Jul 5 '12 at 14:37
sudo chmod u+a /home/pennergives an error on Ubuntu 16.04 (Xenial). Issudo chmod u+rw /home/pennera proper replacement?
– Nickolai Leschov
Apr 14 '16 at 13:51
@NickolaiLeschov Sorry about that--and thanks for pointing out the error! I've fixed the command.
– Eliah Kagan
Jun 21 '16 at 6:13
this is just dumb, why not removeuseraddthen? keeping random broken code
– dashesy
Oct 25 '16 at 16:19
1
@dashesy Thanks--I was not aware that usinguseraddcauses problems on Ubuntu that it doesn't cause on other systems. On my 16.04 system,/etc/default/useraddhas (as its only uncommented line)SHELL=/bin/sh, and useradd(8) seems to say that theSHELLvalue there is used if the-s/--shellflag isn't given, but on my 16.04 system that doesn't happen. I was wrong to say so hastily that Ubuntu'suseraddisn't broken. Now I'm not so sure. Maybe there's a good reason for this difference between Fedora and Debian (and Ubuntu)... but I've deleted my comment so as not to mislead people.
– Eliah Kagan
Dec 27 '16 at 20:59
|
show 1 more comment
Thanks! Something like adduser is nice but I like to know how to do things manually as well. A very thorough answer! I really appreciate it.
– penner
Jul 5 '12 at 14:37
sudo chmod u+a /home/pennergives an error on Ubuntu 16.04 (Xenial). Issudo chmod u+rw /home/pennera proper replacement?
– Nickolai Leschov
Apr 14 '16 at 13:51
@NickolaiLeschov Sorry about that--and thanks for pointing out the error! I've fixed the command.
– Eliah Kagan
Jun 21 '16 at 6:13
this is just dumb, why not removeuseraddthen? keeping random broken code
– dashesy
Oct 25 '16 at 16:19
1
@dashesy Thanks--I was not aware that usinguseraddcauses problems on Ubuntu that it doesn't cause on other systems. On my 16.04 system,/etc/default/useraddhas (as its only uncommented line)SHELL=/bin/sh, and useradd(8) seems to say that theSHELLvalue there is used if the-s/--shellflag isn't given, but on my 16.04 system that doesn't happen. I was wrong to say so hastily that Ubuntu'suseraddisn't broken. Now I'm not so sure. Maybe there's a good reason for this difference between Fedora and Debian (and Ubuntu)... but I've deleted my comment so as not to mislead people.
– Eliah Kagan
Dec 27 '16 at 20:59
Thanks! Something like adduser is nice but I like to know how to do things manually as well. A very thorough answer! I really appreciate it.
– penner
Jul 5 '12 at 14:37
Thanks! Something like adduser is nice but I like to know how to do things manually as well. A very thorough answer! I really appreciate it.
– penner
Jul 5 '12 at 14:37
sudo chmod u+a /home/penner gives an error on Ubuntu 16.04 (Xenial). Is sudo chmod u+rw /home/penner a proper replacement?– Nickolai Leschov
Apr 14 '16 at 13:51
sudo chmod u+a /home/penner gives an error on Ubuntu 16.04 (Xenial). Is sudo chmod u+rw /home/penner a proper replacement?– Nickolai Leschov
Apr 14 '16 at 13:51
@NickolaiLeschov Sorry about that--and thanks for pointing out the error! I've fixed the command.
– Eliah Kagan
Jun 21 '16 at 6:13
@NickolaiLeschov Sorry about that--and thanks for pointing out the error! I've fixed the command.
– Eliah Kagan
Jun 21 '16 at 6:13
this is just dumb, why not remove
useradd then? keeping random broken code– dashesy
Oct 25 '16 at 16:19
this is just dumb, why not remove
useradd then? keeping random broken code– dashesy
Oct 25 '16 at 16:19
1
1
@dashesy Thanks--I was not aware that using
useradd causes problems on Ubuntu that it doesn't cause on other systems. On my 16.04 system, /etc/default/useradd has (as its only uncommented line) SHELL=/bin/sh, and useradd(8) seems to say that the SHELL value there is used if the -s/--shell flag isn't given, but on my 16.04 system that doesn't happen. I was wrong to say so hastily that Ubuntu's useradd isn't broken. Now I'm not so sure. Maybe there's a good reason for this difference between Fedora and Debian (and Ubuntu)... but I've deleted my comment so as not to mislead people.– Eliah Kagan
Dec 27 '16 at 20:59
@dashesy Thanks--I was not aware that using
useradd causes problems on Ubuntu that it doesn't cause on other systems. On my 16.04 system, /etc/default/useradd has (as its only uncommented line) SHELL=/bin/sh, and useradd(8) seems to say that the SHELL value there is used if the -s/--shell flag isn't given, but on my 16.04 system that doesn't happen. I was wrong to say so hastily that Ubuntu's useradd isn't broken. Now I'm not so sure. Maybe there's a good reason for this difference between Fedora and Debian (and Ubuntu)... but I've deleted my comment so as not to mislead people.– Eliah Kagan
Dec 27 '16 at 20:59
|
show 1 more comment
This mostly happens when you create the user without creating a home directory for the user. This can be solved by using this command when creating user
useradd -m the_username
The -m flag is what creates the home directory for the user. After creating the user check if the home directory exists for that user by doing
ls /home
If you can see that username listed there then the last thing to do is assign a password to that user
passwd the_username
You can now login with that username and password
add a comment
|
This mostly happens when you create the user without creating a home directory for the user. This can be solved by using this command when creating user
useradd -m the_username
The -m flag is what creates the home directory for the user. After creating the user check if the home directory exists for that user by doing
ls /home
If you can see that username listed there then the last thing to do is assign a password to that user
passwd the_username
You can now login with that username and password
add a comment
|
This mostly happens when you create the user without creating a home directory for the user. This can be solved by using this command when creating user
useradd -m the_username
The -m flag is what creates the home directory for the user. After creating the user check if the home directory exists for that user by doing
ls /home
If you can see that username listed there then the last thing to do is assign a password to that user
passwd the_username
You can now login with that username and password
This mostly happens when you create the user without creating a home directory for the user. This can be solved by using this command when creating user
useradd -m the_username
The -m flag is what creates the home directory for the user. After creating the user check if the home directory exists for that user by doing
ls /home
If you can see that username listed there then the last thing to do is assign a password to that user
passwd the_username
You can now login with that username and password
answered Apr 16 at 18:24
macleashmacleash
11 bronze badge
11 bronze badge
add a comment
|
add a comment
|
ctrl+alt+f1 and login there and run
sudo chown -R $USER:$USER $HOME
then press ctrl+alt+f7 and try to login
It will work
add a comment
|
ctrl+alt+f1 and login there and run
sudo chown -R $USER:$USER $HOME
then press ctrl+alt+f7 and try to login
It will work
add a comment
|
ctrl+alt+f1 and login there and run
sudo chown -R $USER:$USER $HOME
then press ctrl+alt+f7 and try to login
It will work
ctrl+alt+f1 and login there and run
sudo chown -R $USER:$USER $HOME
then press ctrl+alt+f7 and try to login
It will work
answered Jun 4 '13 at 7:18
Shameer Theen HShameer Theen H
1
1
add a comment
|
add a comment
|
Thanks for contributing an answer to Ask Ubuntu!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f159878%2fcannot-login-to-newly-created-user-account%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
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
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
How did you create the user account? Did you do it from the gui, or from command line? If you do it from command line, you need to be aware that adduser and useradd do things very differently. Also, it kinda seems like the files from /etc/skel weren't copied over. Could you please ls -al on your home dir and in the new user's dir so we can see what's going on?
– SuperMatt
Jul 5 '12 at 9:49