LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   cant able to create user (https://www.linuxquestions.org/questions/linux-server-73/cant-able-to-create-user-4175439978/)

vidyasagar6 12-04-2012 06:43 AM

cant able to create user
 
Dear all,

I created one user name called appsuser
later i deleted that username by using cmd userdel appuser again i am trying to create same user it showing user already exits, how to delete completely

acid_kewpie 12-04-2012 06:46 AM

users exist in /etc/passwd if the users there, it exists, if not, it doesn't. Note that without the -r option, userdel wouldn't delete the /home/ directory, just the actual user itself.

druuna 12-04-2012 06:48 AM

If you used userdel appsuser previously, then the home directory probably still exists.

Use userdel -r appsuser or remove the home directory by hand (as root: rm -rf /home/appsuser).

After that try creating the user.

see man userdel (and possibly useradd) for details

Too slow..... ;)

vidyasagar6 12-04-2012 07:17 AM

Please help me out i deleted some info at /etc/passwd,/et/passwd,

Now i am trying to see users and groups list i am getting error

The user database cannot be read. This problem is most likely caused by a mismatch between /etc/passwd and /etc/shadow or /etc/group and /etc/gshadow. The program will exit now. read.

druuna 12-04-2012 07:32 AM

What is the output of the following 2 commands:
Code:

pwck -rq
grpck -r


vidyasagar6 12-04-2012 07:38 AM

[root@localhost ~]# pwck -rq
no matching password file entry in /etc/passwd
delete line 'bhai0:!!:15674:0:99999:7:::'? No
pwck: no changes
[root@localhost ~]# grpck -r
[root@localhost ~]# grpck -r
[root@localhost ~]#

The above file shows O/P Of pwck -rq and grpck -r ofter run these cmds on terminal

druuna 12-04-2012 07:51 AM

Quote:

Originally Posted by vidyasagar6 (Post 4842495)
[root@localhost ~]# pwck -rq
no matching password file entry in /etc/passwd
delete line 'bhai0:!!:15674:0:99999:7:::'? No
pwck: no changes

pwck does find a potential problem.

Its unclear what you have done and if this specific user (bhai0) is involved in your previous actions.

You can probably fix this specific problem by running (answer Yes if asked):
Code:

pwck -q
PS: Don't edit /etc/passwd, /etc/group, /etc/shadow and /etc/gshadow manually. Use the proper tools to edit them.

vidyasagar6 12-04-2012 07:55 AM

Thank very much now its working fine

druuna 12-04-2012 07:56 AM

:)

Can you put up the [SOLVED] tag.
- above the first post -> Please Mark this thread as solved if you feel a solution has been provided.
- -or- -
- first post -> Thread Tools -> Mark this thread as solved

vidyasagar6 12-04-2012 08:10 AM

how to change a exiting group name

druuna 12-04-2012 08:14 AM

Quote:

Originally Posted by vidyasagar6 (Post 4842524)
how to change a existing group name

Can you explain what it is you want to do and add some relevant details?

pravesh jangra 12-05-2012 08:45 AM

groupmod -n newname oldname

alejandroye 05-08-2014 09:01 AM

Reinstalling server
 
Hellouu,

I am having a problem with the new centos 6.5 reintallation. I reinstalled linux server on a old hard drive with the folders /var and /home folders already existing, so, in the hard drive there is an user already called "power" on the home folder, but now I need to use the same username where the group id is 500, how can I add the same username to get everything intact (sub folders).

#adduser power???
adduser: user 'power' already exists

would I have to do it manually?

please help


All times are GMT -5. The time now is 02:00 PM.