LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 12-04-2012, 06:43 AM   #1
vidyasagar6
Member
 
Registered: Nov 2012
Posts: 36

Rep: Reputation: Disabled
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
 
Old 12-04-2012, 06:46 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
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.
 
Old 12-04-2012, 06:48 AM   #3
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
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.....
 
Old 12-04-2012, 07:17 AM   #4
vidyasagar6
Member
 
Registered: Nov 2012
Posts: 36

Original Poster
Rep: Reputation: Disabled
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.
 
Old 12-04-2012, 07:32 AM   #5
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
What is the output of the following 2 commands:
Code:
pwck -rq
grpck -r
 
Old 12-04-2012, 07:38 AM   #6
vidyasagar6
Member
 
Registered: Nov 2012
Posts: 36

Original Poster
Rep: Reputation: Disabled
[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
 
Old 12-04-2012, 07:51 AM   #7
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Quote:
Originally Posted by vidyasagar6 View Post
[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.
 
1 members found this post helpful.
Old 12-04-2012, 07:55 AM   #8
vidyasagar6
Member
 
Registered: Nov 2012
Posts: 36

Original Poster
Rep: Reputation: Disabled
Thank very much now its working fine
 
Old 12-04-2012, 07:56 AM   #9
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405


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
 
Old 12-04-2012, 08:10 AM   #10
vidyasagar6
Member
 
Registered: Nov 2012
Posts: 36

Original Poster
Rep: Reputation: Disabled
how to change a exiting group name
 
Old 12-04-2012, 08:14 AM   #11
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Quote:
Originally Posted by vidyasagar6 View Post
how to change a existing group name
Can you explain what it is you want to do and add some relevant details?
 
Old 12-05-2012, 08:45 AM   #12
pravesh jangra
LQ Newbie
 
Registered: May 2010
Location: Haryana
Distribution: Red hat
Posts: 15
Blog Entries: 1

Rep: Reputation: 0
groupmod -n newname oldname
 
Old 05-08-2014, 09:01 AM   #13
alejandroye
Member
 
Registered: May 2004
Location: SOUTH FLORIDA USA
Distribution: MANDRIVA / CENTOS
Posts: 146

Rep: Reputation: 15
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
 
  


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
how create create extreme limited user ss4sgoku Linux - Newbie 5 10-28-2012 01:17 AM
Processes running while we create a new user and the user logs in rahulchandrak Linux From Scratch 3 05-07-2010 11:09 PM
Trying to create a /home/user for a new user on a remote server Cyberman Linux - Server 1 03-27-2010 05:27 PM
Create user add file with default password and force user to change it? Morgandy Linux - Newbie 3 02-02-2010 05:06 PM
user home dir doesn't create when new user add dev_mohamed Linux - Software 3 01-12-2007 01:08 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 08:42 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