LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 05-19-2016, 10:41 AM   #1
PleaseHelpMeUnderstand
Member
 
Registered: Apr 2016
Posts: 32

Rep: Reputation: 0
Finding configuration files


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.
 
Old 05-19-2016, 11:00 AM   #2
DavidMcCann
LQ Veteran
 
Registered: Jul 2006
Location: London
Distribution: PCLinuxOS, Debian
Posts: 6,142

Rep: Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314
As well as /etc/passwd you also have /etc/group.

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.
 
Old 05-19-2016, 11:12 AM   #3
PleaseHelpMeUnderstand
Member
 
Registered: Apr 2016
Posts: 32

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by DavidMcCann View Post
As well as /etc/passwd you also have /etc/group.

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.
 
Old 05-20-2016, 11:26 AM   #4
DavidMcCann
LQ Veteran
 
Registered: Jul 2006
Location: London
Distribution: PCLinuxOS, Debian
Posts: 6,142

Rep: Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314
That's right. Trying to combine them would lead to very complex commands! This is useful (even if you don't use Arch, their documentation is always good)
https://wiki.archlinux.org/index.php/Users_and_groups
 
  


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
Finding configuration files. augustus_hill Linux - Newbie 5 03-29-2015 09:19 PM
Finding the parameters in configuration files praveen.amboji Linux - Server 2 06-27-2014 08:40 AM
Finding multiple files with ascending numerical files extensions unim21 Linux - Newbie 3 04-23-2009 07:50 PM
Autoconf not finding configuration script rfleming Linux - Software 0 02-21-2008 07:15 PM
Finding files and then finding content within those files... Maeltor Linux - Software 5 03-13-2007 12:06 PM

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

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