Unable to create user in linux

 
Thread Tools Search this Thread
Operating Systems Linux Red Hat Unable to create user in linux
# 1  
Old 04-20-2011
Unable to create user in linux

Hi

Code:
 
[ankkhura@xyz/]$ uname -a
Linux xyz 2.6.18-128.0.0.0.2.el5 #1 SMP Wed Jan 21 05:17:33 EST 2009 x86_64 x86_64 x86_64 GNU/Linux


I am unable to add a new user getting following

Code:
[root@xyz~]# id
uid=0(root) gid=0(root) groups=0(root),1(bin),2(daemon),3(sys),4(adm),6(disk),10(wheel),1024(txtdba),1235(txtdba7),9045(dba_jh)
[root@xyz~]# useradd ank
useradd: cannot create directory /home/ank

If i go to / and do ls -altr i can see the home directory is there but 0 Bytes.

Code:
[root@xyz/]# pwd
/
[root@xyz/]# ls -altr
total 244
drwxrwxrwx   2 root root   4096 Dec  4  2002 ade
drwxr-xr-x  28 root root   4096 Dec  6  2002 var
drwxrwxrwx  14 root root   4096 Feb 13  2004 scratch
drwxr-xr-x   2 root root   4096 Apr  3  2004 ade_autofs
drwxr-xr-x   2 root root   4096 Jun  5  2007 .automount
drwxr-xr-x  17 root root   4096 Sep 11  2007 usr
drwxr-xr-x   2 root root   4096 Jan  9  2009 srv
drwxr-xr-x   2 root root   4096 Jan  9  2009 media
drwxr-xr-x   2 root root   4096 Jan 21  2009 misc
drwx------   2 root root  16384 Mar 30 19:27 lost+found
drwxr-xr-x   7 root root  12288 Mar 30 21:16 lib64
drwxr-xr-x  12 root root   4096 Mar 30 21:16 lib
drwxr-xr-x   2 root root   4096 Mar 30 21:16 bin
drwxr-xr-x   2 root root  12288 Mar 30 21:16 sbin
drwxr-xr-x   3 root root      0 Mar 30 21:19 net
drwxr-xr-x   2 root root   4096 Mar 30 23:27 selinux
drwxr-xr-x   3 root root   4096 Mar 30 23:49 tftpboot
lrwxrwxrwx   1 root games    28 Mar 30 23:59 OracleProd -> /usr/local/redhat/OracleProd
lrwxrwxrwx   1 root games    18 Mar 30 23:59 oracle -> /OracleProd/oracle
drwxr-xr-x   2 root root   4096 Mar 31 00:01 LOCAL_SWAP
drwxr-x---   3 root root   4096 Mar 31 00:01 root
drwxr-xr-x   3 root root   4096 Mar 31 00:02 boot
drwxr-xr-x   3 root root   4096 Mar 31 00:02 mnt
drwxr-xr-x   5 root root   4096 Mar 31 00:02 opt
dr-xr-xr-x 171 root root      0 Mar 31 00:07 proc
drwxr-xr-x  11 root root      0 Mar 31 00:07 sys
-rw-r--r--   1 root root      0 Mar 31 00:08 .autorelabel
-rw-r--r--   1 root root      0 Mar 31 00:08 .autofsck
drwxr-xr-x   2 root root      0 Mar 31 00:08 home
-rw-------   1 root root   1024 Mar 31 00:09 .rnd
drwxr-xr-x  30 root root   4096 Mar 31 00:09 ..
drwxr-xr-x  30 root root   4096 Mar 31 00:09 .
drwxr-xr-x  10 root root   3860 Mar 31 00:09 dev
drwxrwxrwt   5 root root   4096 Apr 20 04:02 tmp
drwxr-xr-x 143 root root  12288 Apr 20 12:40 etc

Does that make a differnece
# 2  
Old 04-20-2011
From the directory listing you supplied, it looks like users home directories may be automounted. Is this computer one of a network of computers running NIS or suchlike? Are other users listed in /etc/passwd?
# 3  
Old 04-20-2011
Well It's a fresh VM given to me for oracle installation. And I do not see any user created manually in /etc/passwd. How do i make sure if /home is auto mounted? I do have root password.


Thanks in advance.
Ankurk
# 4  
Old 04-20-2011
what about stopping autofs and then try to create the user account.
# 5  
Old 04-21-2011
Hi My auto.master file shows this

Code:
/home yp:auto_home_adc tcp,intr,timeo=1380,rsize=8192,wsize=8192,retrans=2

What does that mean?
# 6  
Old 04-21-2011
It means that the /home directories are NFS mounted. Check if there is a system on your network called yp.

By the way, if you do not need to have NIS and autofs running, you can just stop those services and configure the system to use local authentication (files) and home directories.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Unable to create new user without lower character

Hi friends, I want to create new user BG0001 in SunOS and getting below errorbash-3.2# useradd -d /home/BG0001 -m -s /bin/sh BG0001 UX: useradd: BG0001 name should have at least one lower case character. bash-3.2# bash-3.2# OS version is as belowbash-3.2# cat /etc/release ... (7 Replies)
Discussion started by: sandeepkmehra
7 Replies

2. Solaris

Unable to create a ftp user only

Hi all I am facing difficulties when using the useraddcommand. when running useradd -u 60006 -g 100 -d /opt/xxx/yyy/z -m -s /bin/false ftpuser It does create the user, but with a wrong home directory. It creates its home directory at /home/ftpuser Please can you help? (2 Replies)
Discussion started by: fretagi
2 Replies

3. HP-UX

[Solved] Unable to change/create home dir for particular user

Hi all I wanted to change the home dir for a user, but when using smh : SMH->Accounts for Users and Groups->Local Users->Modify User ---------------------------------------------------------------------------------------------------------------------------------------------- * Required... (8 Replies)
Discussion started by: fretagi
8 Replies

4. Solaris

Unable to create or delete a directory in /usr with root user

Hi All, I am trying to uninstall jdk 1.5 from my Solaris 10 64 bit but some how was not successful.so tried to delete the folder of jdk from /usr but its throughing error as: Unable to remove directory jdk: Read-only file system Even I tried to create a dir in /usr but its not allowing me... (4 Replies)
Discussion started by: Pshah
4 Replies

5. Homework & Coursework Questions

Create script to add user and create directory

first off let me introduce myself. My name is Eric and I am new to linux, I am taking an advanced linux administration class and we are tasked with creating a script to add new users that anyone can run, has to check for the existence of a directory. if the directory does not exist then it has... (12 Replies)
Discussion started by: pbhound
12 Replies

6. Solaris

Unable to create folder as a user

Hi All, I am trying to create a folder in /export/home/user1 directory as a user1 but I am getting the error message as -bash-3.00$ mkdir abc mkdir: Failed to make directory "abc"; Permission denied Also I tried creating the folder but it fails too -bash-3.00$ touch abc touch: cannot... (2 Replies)
Discussion started by: Manjunath K V
2 Replies

7. Solaris

unable to create flar

Hello friend, Now i'm doing JDS3.1 in v440 servers.while checking the lustatus command getiing out like this lustatus Boot Environment Is Active Active Can Copy Name Complete Now On Reboot Delete Status -------------------------- --------... (0 Replies)
Discussion started by: rjay.com
0 Replies

8. AIX

Unable to create a group

Hi, I'm trying to create a new group on an AIX 5.2.0.0. server but am getting the following error: root:/root $ mkgroup debt 3004-698 Error committing changes to "debt" : Value is invalid. I've change the group name to no affect. Does anyone have any ideas what could be causing this? ... (0 Replies)
Discussion started by: m223464
0 Replies

9. AIX

User unable to create a file over 2 GB's in size

Hello, this is my first post. I have a user who cannot create a file over 2 GB's in size eventhough the FS is large file enabled and I added a special stanza in /etc/security/limits to allow an unlimited file size for this particular user (user1 - see below). ibm:/home/root (4062)#cat... (7 Replies)
Discussion started by: AIXtexas
7 Replies

10. UNIX for Advanced & Expert Users

Other than root user .Normal user is unable to create files

Hi all, I am using Sun Solaris 9 .In this system normal users unable to create files from the command line.I added these users in bin,adm and even root group i found them unable to create a file. (1 Reply)
Discussion started by: mallesh
1 Replies
Login or Register to Ask a Question