LinuxQuestions.org
Review your favorite Linux distribution.
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 07-17-2007, 11:38 AM   #1
linexnal
LQ Newbie
 
Registered: Jul 2007
Posts: 29

Rep: Reputation: 15
id: cannot find name for group ID 500


I try to add a new user to see if the error goes away but I can't even add a new user..

id: cannot find name for group ID 500
[.@localhost home]$ su
Password:
[root@localhost home]# adduser abc
bash: adduser: command not found
[root@localhost home]# adduser
bash: adduser: command not found
[root@localhost home]# addusr
bash: addusr: command not found
[root@localhost home]# adduser
bash: adduser: command not found
[root@localhost home]# adduser
bash: adduser: command not found
[root@localhost home]# man adduser
Formatting page, please wait...
[root@localhost home]# useradd
bash: useradd: command not found
[root@localhost home]# man adduser
[root@localhost home]# useradd -D
bash: useradd: command not found
[root@localhost home]#
 
Old 07-17-2007, 11:44 AM   #2
kilgoretrout
Senior Member
 
Registered: Oct 2003
Posts: 2,986

Rep: Reputation: 388Reputation: 388Reputation: 388Reputation: 388
In redhat and fedora, the adduser command is in /usr/sbin which is not in PATH so you have to give the complete path to the executable:

# /usr/sbin/adduser

Try that.
 
Old 07-17-2007, 11:45 AM   #3
linexnal
LQ Newbie
 
Registered: Jul 2007
Posts: 29

Original Poster
Rep: Reputation: 15
Oh and when I open the home files I get a
"Cannot find parent item file:///home in the tree. Internal error."
 
Old 07-17-2007, 11:55 AM   #4
linexnal
LQ Newbie
 
Registered: Jul 2007
Posts: 29

Original Poster
Rep: Reputation: 15
Is there a way to put all commands into this "PATH" so then it would work...
 
Old 07-17-2007, 03:50 PM   #5
jay73
LQ Guru
 
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019

Rep: Reputation: 133Reputation: 133
You can do /usr/sbin/adduser instead.
 
Old 07-18-2007, 10:39 AM   #6
jdc2048
Member
 
Registered: Jul 2002
Distribution: Redhat, Gentoo, Solaris, HP-UX, etc...
Posts: 391

Rep: Reputation: 30
What are your permissions on the following files?

/etc/group
/etc/passwd
/etc/shadow
/etc/nsswitch.conf

Also, verify that nsswitch.conf has "group files" if you're just using files. files can be followed by other methods if needed, or if you're using some other method, then that needs to come first.
 
Old 07-18-2007, 11:05 PM   #7
linexnal
LQ Newbie
 
Registered: Jul 2007
Posts: 29

Original Poster
Rep: Reputation: 15
/etc/group
It says it can read/write for owner which is root and read for the rest.

When I typed it, it returned

[root@localhost home]# /etc/group
bash: /etc/group: Permission denied

/etc/passwd has the same permission

[root@localhost home]# /etc/passwd
bash: /etc/passwd: Permission denied

/etc/shadow has whatever is defaulted also.. read for owner and forbidden for rest

[root@localhost home]# /etc/shadow
bash: /etc/shadow: Permission denied

--
This is what's inside nsswitch.conf ..I don't know what it is nor what it does, even after reading this.. it must be for technical people.

[root@localhost home]# /etc/nsswitch.conf
bash: /etc/nsswitch.conf: Permission denied
[root@localhost home]# cat /etc/nsswitch.conf
#
# /etc/nsswitch.conf
#
# An example Name Service Switch config file. This file should be
# sorted with the most-used services at the beginning.
#
# The entry '[NOTFOUND=return]' means that the search for an
# entry should stop if the search in the previous entry turned
# up nothing. Note that if the search failed due to some other reason
# (like no NIS server responding) then the search continues with the
# next entry.
#
# Legal entries are:
#
# nisplus or nis+ Use NIS+ (NIS version 3)
# nis or yp Use NIS (NIS version 2), also called YP
# dns Use DNS (Domain Name Service)
# files Use the local files
# db Use the local database (.db) files
# compat Use NIS on compat mode
# hesiod Use Hesiod for user lookups
# [NOTFOUND=return] Stop searching if not found so far
#

# To use db, put the "db" in front of "files" for entries you want to be
# looked up first in the databases
#
# Example:
#passwd: db files nisplus nis
#shadow: db files nisplus nis
#group: db files nisplus nis

passwd: files
shadow: files
group: files

#hosts: db files nisplus nis dns
hosts: files dns

# Example - obey only what nisplus tells us...
#services: nisplus [NOTFOUND=return] files
#networks: nisplus [NOTFOUND=return] files
#protocols: nisplus [NOTFOUND=return] files
#rpc: nisplus [NOTFOUND=return] files
#ethers: nisplus [NOTFOUND=return] files
#netmasks: nisplus [NOTFOUND=return] files

bootparams: nisplus [NOTFOUND=return] files

ethers: files
netmasks: files
networks: files
protocols: files
rpc: files
services: files

netgroup: nisplus

publickey: nisplus

automount: files nisplus
aliases: files nisplus

[root@localhost home]#

--
"files can be followed by other methods if needed, or if you're using some other method, then that needs to come first."
I don't even know what I'm doing or what to do..

/usr/sbin/adduser works but...

[root@localhost home]# /usr/sbin/adduser
Usage: useradd [options] LOGIN

Options:
-b, --base-dir BASE_DIR base directory for the new user account
home directory
-c, --comment COMMENT set the GECOS field for the new user account
-d, --home-dir HOME_DIR home directory for the new user account
-D, --defaults print or save modified default useradd
configuration
-e, --expiredate EXPIRE_DATE set account expiration date to EXPIRE_DATE
-f, --inactive INACTIVE set password inactive after expiration
to INACTIVE
-g, --gid GROUP force use GROUP for the new user account
-G, --groups GROUPS list of supplementary groups for the new
user account
-h, --help display this help message and exit
-k, --skel SKEL_DIR specify an alternative skel directory
-K, --key KEY=VALUE overrides /etc/login.defs defaults
-m, --create-home create home directory for the new user
account
-l, do not add user to lastlog database file
-M, do not create user's home directory(overrides /etc/login.defs)
-r, create system account
-o, --non-unique allow create user with duplicate
(non-unique) UID
-p, --password PASSWORD use encrypted password for the new user
account
-s, --shell SHELL the login shell for the new user account
-u, --uid UID force use the UID for the new user account
-Z, --selinux-user SEUSER use a specific SEUSER for the SELinux user mapping

...which do I pick.. none of them seems to work. Do I pick a combination of options or only one? What does something like -D do exactly? "print or save modified default" tells very little.. I don't even know what are the defaults.. where does it save it to. "print or save" huh? How do I choose which.. does it provide a choice after you enter '-D'? Does the computer flip a coin and randomly choose? Why does -p, have --password & PASSWORD.. am I suppose to put all three? just the one in caps? Why have one in caps and one not.. it's confusing. Is that the description or the option. They don't label it directly...

or explain anything...

[root@localhost home]# /usr/sbin/adduser -d /home/123
Usage: useradd [options] LOGIN

Options:
-b, --base-dir BASE_DIR base directory for the new user account

Nope another one that didn't work either.. it just brought up the menu again.

so I tried help..

[root@localhost home]# -h
bash: -h: command not found
[root@localhost home]# /usr/sbin/adduser -h
/usr/sbin/adduser: invalid option -- h
Usage: useradd [options] LOGIN

Options:
-b, --base-dir BASE_DIR base directory for the new user account
home directory

[root@localhost home]# --help
bash: --help: command not found
[root@localhost home]#

I guess I've yet to find any top-notch, high-quality tutorials.

Linux is lovely...

Last edited by linexnal; 07-18-2007 at 11:16 PM.
 
Old 07-18-2007, 11:16 PM   #8
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
List the permissions of files by entering "ls -l <filename>" and not by trying to run them.

Why don't you use "/usr/bin/system-config-users" to create new users?
 
Old 07-19-2007, 12:22 AM   #9
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Ubuntu 12.04, Antix19.3
Posts: 3,794

Rep: Reputation: 282Reputation: 282Reputation: 282
Quote:

When I typed it, it returned

[root@localhost home]# /etc/group
bash: /etc/group: Permission denied

/etc/passwd has the same permission

[root@localhost home]# /etc/passwd
bash: /etc/passwd: Permission denied

/etc/shadow has whatever is defaulted also.. read for owner and forbidden for rest

[root@localhost home]# /etc/shadow
bash: /etc/shadow: Permission denied
Those are not commands but data files, so you are not supposed to execute them and therefore can not execute them.

Can't help you with your problem.
 
Old 07-19-2007, 11:17 AM   #10
linexnal
LQ Newbie
 
Registered: Jul 2007
Posts: 29

Original Poster
Rep: Reputation: 15
Well /usr/bin/system-config-users worked great! And both errors went away.

"Why don't you use "/usr/bin/system-config-users" to create new users?"
b/c I wasn't aware of it and nobody mentioned that one as can be seen from the above posts. I guess that is a command since it worked..

I'm trying to move the files from the old user to the new one at http://www.linuxquestions.org/questi...74#post2829474

Feel free to spread your knowledge.

--
"Can't help you with your problem."
So don't reply. Thanks for nothing "Senior Member". You don't belong in the "Linux - Newbie" forum.

Last edited by linexnal; 07-19-2007 at 11:19 AM.
 
  


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
cannot find user ID 500 fernin8r Linux - General 32 07-17-2007 01:32 PM
LXer: SpeedFilm Joins Chastain Motorsports’ Indy 500 Program, Credits Tux 500 LXer Syndicated Linux News 0 05-24-2007 03:31 PM
LXer: Tux 500: Linux Sponsors Indianapolis 500 LXer Syndicated Linux News 1 04-18-2007 12:33 PM
id: cannot find name for user ID 500 stakhous Linux - Newbie 1 07-02-2004 02:25 PM
cannot find name for group ID 1 rmosh Linux - Software 1 05-22-2003 10:44 AM

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

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