Use previous users already present in Linux Home directory

Clash Royale CLAN TAG#URR8PPP up vote
1
down vote
favorite
I recently installed a fresh copy of Ubuntu 16.04.0 LTS on my server PC. I mounted my earlier /home directory to it. It consisted of multiple user accounts that were previously made.
But after installation, none of that account showed on the login screen. Now, I recreated those account using same earlier information (i.e. Name, Username .etc), but now whenever they try to login from the login screen, they are unable to do so while when they use ssh for login, the following message is shown:

Moreover, there are some directory ownership issues as well. Could somehow help in solving the problem.
ssh login users
add a comment |Â
up vote
1
down vote
favorite
I recently installed a fresh copy of Ubuntu 16.04.0 LTS on my server PC. I mounted my earlier /home directory to it. It consisted of multiple user accounts that were previously made.
But after installation, none of that account showed on the login screen. Now, I recreated those account using same earlier information (i.e. Name, Username .etc), but now whenever they try to login from the login screen, they are unable to do so while when they use ssh for login, the following message is shown:

Moreover, there are some directory ownership issues as well. Could somehow help in solving the problem.
ssh login users
add a comment |Â
up vote
1
down vote
favorite
up vote
1
down vote
favorite
I recently installed a fresh copy of Ubuntu 16.04.0 LTS on my server PC. I mounted my earlier /home directory to it. It consisted of multiple user accounts that were previously made.
But after installation, none of that account showed on the login screen. Now, I recreated those account using same earlier information (i.e. Name, Username .etc), but now whenever they try to login from the login screen, they are unable to do so while when they use ssh for login, the following message is shown:

Moreover, there are some directory ownership issues as well. Could somehow help in solving the problem.
ssh login users
I recently installed a fresh copy of Ubuntu 16.04.0 LTS on my server PC. I mounted my earlier /home directory to it. It consisted of multiple user accounts that were previously made.
But after installation, none of that account showed on the login screen. Now, I recreated those account using same earlier information (i.e. Name, Username .etc), but now whenever they try to login from the login screen, they are unable to do so while when they use ssh for login, the following message is shown:

Moreover, there are some directory ownership issues as well. Could somehow help in solving the problem.
ssh login users
ssh login users
edited Apr 10 at 16:13
stumblebee
2,3083922
2,3083922
asked Apr 10 at 15:39
Muhammad Mubeen
82
82
add a comment |Â
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
2
down vote
accepted
Make sure that the uid and gid of the new accounts you made match the uid and gid in the old /home directories. E.g. looking at /etc/passwd will give you the uid and gid in the third and fourth fields, respectively. An 'ls -la /home' will give you the uid and gid recorded in the file system.
If these do not match, you will need to do 'chown -R uid:gid /home/user' where uid and gid are the values from /etc/passwd. You will also need to make sure that 'user' in /home/user matches the value in /etc/passwd. You can change that value, if needed, with 'usermod'.
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
2
down vote
accepted
Make sure that the uid and gid of the new accounts you made match the uid and gid in the old /home directories. E.g. looking at /etc/passwd will give you the uid and gid in the third and fourth fields, respectively. An 'ls -la /home' will give you the uid and gid recorded in the file system.
If these do not match, you will need to do 'chown -R uid:gid /home/user' where uid and gid are the values from /etc/passwd. You will also need to make sure that 'user' in /home/user matches the value in /etc/passwd. You can change that value, if needed, with 'usermod'.
add a comment |Â
up vote
2
down vote
accepted
Make sure that the uid and gid of the new accounts you made match the uid and gid in the old /home directories. E.g. looking at /etc/passwd will give you the uid and gid in the third and fourth fields, respectively. An 'ls -la /home' will give you the uid and gid recorded in the file system.
If these do not match, you will need to do 'chown -R uid:gid /home/user' where uid and gid are the values from /etc/passwd. You will also need to make sure that 'user' in /home/user matches the value in /etc/passwd. You can change that value, if needed, with 'usermod'.
add a comment |Â
up vote
2
down vote
accepted
up vote
2
down vote
accepted
Make sure that the uid and gid of the new accounts you made match the uid and gid in the old /home directories. E.g. looking at /etc/passwd will give you the uid and gid in the third and fourth fields, respectively. An 'ls -la /home' will give you the uid and gid recorded in the file system.
If these do not match, you will need to do 'chown -R uid:gid /home/user' where uid and gid are the values from /etc/passwd. You will also need to make sure that 'user' in /home/user matches the value in /etc/passwd. You can change that value, if needed, with 'usermod'.
Make sure that the uid and gid of the new accounts you made match the uid and gid in the old /home directories. E.g. looking at /etc/passwd will give you the uid and gid in the third and fourth fields, respectively. An 'ls -la /home' will give you the uid and gid recorded in the file system.
If these do not match, you will need to do 'chown -R uid:gid /home/user' where uid and gid are the values from /etc/passwd. You will also need to make sure that 'user' in /home/user matches the value in /etc/passwd. You can change that value, if needed, with 'usermod'.
answered Apr 10 at 16:03
Martin W
74238
74238
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1023699%2fuse-previous-users-already-present-in-linux-home-directory%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password