LinuxQuestions.org
Visit Jeremy's Blog.
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, 05: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, 05: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, 06: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, 08:03 PM   #4
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,241

Rep: Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325
Also post the relevant entry in /etc/passwd
 
Old 08-20-2009, 03: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, 04: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, 09:54 PM   #7
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,241

Rep: Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325
Can I just point out that the 'login shell' in the passwd rec is set to /sbin/nologin(!!)
 
Old 08-21-2009, 07: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, 08:07 AM   #9
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Nagpur, India
Distribution: Cent OS 5/6, Ubuntu Server 10.04
Posts: 4,629

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


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 06:48 AM
unable to creat io-slave Penguin of Wonder Linux - Hardware 0 09-26-2005 02:29 AM
creat MySQL database for each user ? Data-Base SUSE / openSUSE 3 03-07-2005 03:42 PM
Unable To Login to X-System/Command Line as User drdroid Linux - General 4 02-08-2004 09:26 PM
how to Creat a User cerberus Slackware 4 05-14-2003 11:00 PM


All times are GMT -5. The time now is 04:43 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration