is it really not possible for me to edit the etc/group & the etc/passwd files?


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers is it really not possible for me to edit the etc/group & the etc/passwd files?
# 1  
Old 12-10-2008
is it really not possible for me to edit the etc/group & the etc/passwd files?

From what I have read it possible to create a new group by editing the etc/group and etc/passwd in UNIX two files but a non-experienced user may face many problems such as destroying the file by mistake ot that his changes to these file does not make any difference.
However, there is this command that creates a new group in a UNIX system
sudo addgroup fwlog-reader
sudo addgroup fwlog-author
without the need for the user to go and edit the two files, so just writing this command will create the group I want.



i want to know if it is possible for me to create/edit groups in UNIX and if its possible, then how?


thnx
# 2  
Old 12-11-2008
You have already answered your own question - use the command to add groups. The reason why: if you mess up it is possible to create a situation where users cannot log in.

If you enjoy restoring the /etc directory tree from tape backups, then edit the files.
# 3  
Old 12-11-2008
Usually the commands are called groupadd, groupmod, and groupdel. Also there is useradd, usermod, and userdel.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Conflicting GID in group and passwd files.

Hi guys, I have a question. In the passwd file, user johndoe has a GID of 100 which is the group named users in the group file. But if you check the group file, johndoe is not listed under GID 100, but under GID 33, which is the group named videos. Under what group does johndoe really belong,... (1 Reply)
Discussion started by: goldenlight1814
1 Replies

2. Shell Programming and Scripting

need a one liner to grep a group info from /etc/group and use that result to search passwd file

/etc/group tiadm::345:mk789,po312,jo343,ju454,ko453,yx879,iy345,hn453 bin::2:root,daemon sys::3:root,bin,adm adm::4:root,daemon uucp::5:root /etc/passwd mk789:x:234:1::/export/home/dummy:/bin/sh po312:x:234:1::/export/home/dummy:/bin/sh ju454:x:234:1::/export/home/dummy:/bin/sh... (6 Replies)
Discussion started by: chidori
6 Replies

3. UNIX for Dummies Questions & Answers

Inconsistency between passwd and group

Hi, I have a passwd file with 3 users belonging to the the root group (gid=0), but the group file does not list these users as members of the root group? Shoud I be worried and apart from manually changing it, how can it be remediated? thx Norgaard (1 Reply)
Discussion started by: Norgaard
1 Replies

4. UNIX for Dummies Questions & Answers

How to edit /etc/passwd file to change the comment

Hi All, I need to change the comment field in /etc/passwd file for one userid in my RHEL linux m/cs. I tried to open the file in vi editor and changed the comment, but next day it's getting reverted back again. :-( mitchell:x:1000:900:Jon Mitchell User:/home/mitchell:/bin/bash I need to... (2 Replies)
Discussion started by: NARESH1302
2 Replies

5. UNIX for Dummies Questions & Answers

Understanding group and passwd

Hi, I am checking who belong to the dba group , and found that oracle and autosys users are part of this group cat /etc/group | grep dba dba::400:oracle,autosys I thought to found user autosys under group 400 togther with user oracle , but found it in group 1000 as you can see bellow.... (2 Replies)
Discussion started by: yoavbe
2 Replies

6. UNIX for Dummies Questions & Answers

Search for & edit rows & columns in data file and pipe

Dear unix gurus, I have a data file with header information about a subject and also 3 columns of n rows of data on various items he owns. The data file looks something like this: adam peter blah blah blah blah blah blah car 01 30 200 02 31 400 03 57 121 .. .. .. .. .. .. n y... (8 Replies)
Discussion started by: tintin72
8 Replies

7. UNIX and Linux Applications

Edit/update an /etc/group database entry (c/c++)

Hello I'm writing a program for managing accounts and groups in a linux system. My problem is how to update the members of a group in the /etc/group file,if i have to add/remove those members. total 3 variables for adding some new members to the group : char **oldmembers=grp->gr_mem; ... (1 Reply)
Discussion started by: mekos
1 Replies

8. UNIX for Dummies Questions & Answers

How to edit the /etc/passwd file not using root?

Hi All, Today I faced a problem trying to log in as root. The output error is cannot execute sh: No such file.... I doubted there is something wrong with shell interpreter which resides in /etc/passwd file for every user who logs in. I checked and the line for root account was... (4 Replies)
Discussion started by: elthox
4 Replies

9. UNIX for Dummies Questions & Answers

grep group and passwd file

How can I find find all members in the /etc/password file that belong to the dba group in the /etc/group file? (4 Replies)
Discussion started by: mozartny
4 Replies
Login or Register to Ask a Question