LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   id: cannot find name for group ID 500 (https://www.linuxquestions.org/questions/linux-newbie-8/id-cannot-find-name-for-group-id-500-a-570125/)

linexnal 07-17-2007 11:38 AM

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]#

kilgoretrout 07-17-2007 11:44 AM

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.

linexnal 07-17-2007 11:45 AM

Oh and when I open the home files I get a
"Cannot find parent item file:///home in the tree. Internal error."

linexnal 07-17-2007 11:55 AM

Is there a way to put all commands into this "PATH" so then it would work...

jay73 07-17-2007 03:50 PM

You can do /usr/sbin/adduser instead.

jdc2048 07-18-2007 10:39 AM

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.

linexnal 07-18-2007 11:05 PM

/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...

jschiwal 07-18-2007 11:16 PM

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?

Wim Sturkenboom 07-19-2007 12:22 AM

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.

linexnal 07-19-2007 11:17 AM

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.


All times are GMT -5. The time now is 11:57 PM.