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 need to find which configuration file contains user account information such as login name, UID, GID, home directory location, and other account information. I typed more /etc/passwd but it only listed the user name, user ID, home directory locations but not the group ID & other account information. Please help me understand
Last edited by PleaseHelpMeUnderstand; 05-19-2016 at 11:04 AM.
Editing those directly can lead to disasters, but there are commands to make it safe: vipw and vigr (see their man pages). They load the file into the vi editor and check it after you've altered it: they won't save your alterations if you've made a mistake. If you don't like vi, then you can set them to use (e.g.) nano with export EDITOR=nano. You can also check the files for errors with the commands pwck and grpck.
There are also various commands (again, see the man pages) for doing things without editing the files directly: useradd, usermod, userdel, passwd, groupadd, groupmod, groupdel.
And of course there will be a users and groups management program in your desktop, which is usually the safest option.
Editing those directly can lead to disasters, but there are commands to make it safe: vipw and vigr (see their man pages). They load the file into the vi editor and check it after you've altered it: they won't save your alterations if you've made a mistake. If you don't like vi, then you can set them to use (e.g.) nano with export EDITOR=nano. You can also check the files for errors with the commands pwck and grpck.
There are also various commands (again, see the man pages) for doing things without editing the files directly: useradd, usermod, userdel, passwd, groupadd, groupmod, groupdel.
And of course there will be a users and groups management program in your desktop, which is usually the safest option.
Thank you for your help.
I don't want to edit, add/subtract or modify anything I just want to know which file contains them all.
I just typed man group, man passwd, man groupmod all separately. Is it safe to say there isn't a single command to find what I'm looking for but both the commands you stated /etc/passwd and /etc/group do this collectively?
Last edited by PleaseHelpMeUnderstand; 05-19-2016 at 11:21 AM.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.