Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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]#
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.
--
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
--
"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..
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...
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..
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.