LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-18-2009, 04:17 AM   #1
mbanwi
LQ Newbie
 
Registered: Jul 2009
Posts: 16

Rep: Reputation: 0
unable to creat system user


hi,i use centos5, lately i notice that when i add a new user withthe useradd and passwd command, and then try to login using this new account, am being prompted with a message,saying ' you cannot access /home/newuser. that the account doesnot have permission on his home directory. i have even tried go give the user(john) ownership over his home directory with the
#chown -R john:john /home/john
but not still working. please can anyone help
 
Old 08-18-2009, 04:41 AM   #2
centosboy
Senior Member
 
Registered: May 2009
Location: london
Distribution: centos5
Posts: 1,137

Rep: Reputation: 116Reputation: 116
Quote:
Originally Posted by mbanwi View Post
hi,i use centos5, lately i notice that when i add a new user withthe useradd and passwd command, and then try to login using this new account, am being prompted with a message,saying ' you cannot access /home/newuser. that the account doesnot have permission on his home directory. i have even tried go give the user(john) ownership over his home directory with the
#chown -R john:john /home/john
but not still working. please can anyone help
paste the output of

Code:
ls -ld /home/john
here
 
Old 08-19-2009, 05:22 AM   #3
mbanwi
LQ Newbie
 
Registered: Jul 2009
Posts: 16

Original Poster
Rep: Reputation: 0
this is the output. before i forget, the user is norbert rather than john.


[root@appdev ~]# ls -ld /home/norbert
drwx------ 4 norbert norbert 4096 Aug 18 11:22 /home/norbert
 
Old 08-19-2009, 07:03 PM   #4
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,358

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
Also post the relevant entry in /etc/passwd
 
Old 08-20-2009, 02:32 AM   #5
mbanwi
LQ Newbie
 
Registered: Jul 2009
Posts: 16

Original Poster
Rep: Reputation: 0
here is it:

norbert:x:519:520::/home/norbert:/sbin/nologin
 
Old 08-20-2009, 03:20 AM   #6
centosboy
Senior Member
 
Registered: May 2009
Location: london
Distribution: centos5
Posts: 1,137

Rep: Reputation: 116Reputation: 116
Quote:
Originally Posted by mbanwi View Post
here is it:

norbert:x:519:520::/home/norbert:/sbin/nologin
looks like norbert might have an incorrect group id.

if you check 520 in /etc/group you will see who is the group owner.
what you need to do here is change norberts gid which is currently 520 to 519.

in /etc/group, change norberts gid to 519
in /etc/passwd change norberts gid 519

and

chown -R norbert.norbert /home/norbert


should solve the problem.
 
Old 08-20-2009, 08:54 PM   #7
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,358

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
Can I just point out that the 'login shell' in the passwd rec is set to /sbin/nologin(!!)
 
Old 08-21-2009, 06:52 AM   #8
mbanwi
LQ Newbie
 
Registered: Jul 2009
Posts: 16

Original Poster
Rep: Reputation: 0
hi
there is another user with gid of 19.so i have rather changed the user id from 19 to 20 also
and then used the #chown -R norbert.norbert /home/norbert.
but it's giving this message below:

could not chdir to home directory /home/norbert: permission denied
this account is currently not available
 
Old 08-21-2009, 07:07 AM   #9
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Gurgaon, India
Distribution: Cent OS 6/7
Posts: 4,631

Rep: Reputation: Disabled
Quote:
Originally Posted by mbanwi View Post
here is it:

norbert:x:519:520::/home/norbert:/sbin/nologin
Does not it look like unusual.

It should be

chaitanya:x:1000:1000:chaitanya,,,:/home/chaitanya:/bin/bash
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Why i cannot creat a new user with the same permissons of ROOT user M3t4L Slackware 8 10-29-2006 05:48 AM
unable to creat io-slave Penguin of Wonder Linux - Hardware 0 09-26-2005 01:29 AM
creat MySQL database for each user ? Data-Base SUSE / openSUSE 3 03-07-2005 02:42 PM
Unable To Login to X-System/Command Line as User drdroid Linux - General 4 02-08-2004 08:26 PM
how to Creat a User cerberus Slackware 4 05-14-2003 10:00 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:27 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration