1753359 Members
5996 Online
108792 Solutions
New Discussion юеВ

Re: group file error

 
himacs
Super Advisor

group file error

Hi Admin,

Please find the attached error while opening SAM.

When check found that root group name is updated as Root instead of root in /etc.group.

Please suggest how we can edit group file

Regards
himacs
9 REPLIES 9
No├й
Valued Contributor

Re: group file error

Hi.

If I understand correctly, you can not edit the file /etc/group.
Is that correct?

Why not use vi /etc/group?

Regards.
himacs
Super Advisor

Re: group file error

Hi Noe,

Thanks for the reply..

Thats my concern.. can we edit group file using vi..?

Regards
himacs
No├й
Valued Contributor

Re: group file error

I think you do not know how to use the vi editor.

vi /etc/group

If you do not know how to use the vi editor, please give me the content of your "/etc/group"

A Vi manual:
http://www.cs.fsu.edu/general/vimanual.html
himacs
Super Advisor

Re: group file error

Noe,

M familiar with the vi editor.We use vipw editor to edit the /etc/passwd file .

i want to know ,the same way any other secured option is available to edit group file other than vi.

We should be logged as root to edit the group
and since we are changing the group name Root,which contains root user(uid 0) as member.

So now my Q is whterher we can change the group name of root, with being logged as root.

Like we cant change the uid of any user, when user is busy.

Regards
himacs
No├й
Valued Contributor

Re: group file error

Hello.

Since you can not change the user group while it is logged and because this user is root, I think of several options (perhaps there is a better alternative):

-Edit the file with vi and change it correctly and then reboot.
-Boot the system in single user and make the change and start.

The first option is better.

Regards.
himacs
Super Advisor

Re: group file error

Hi Noe,

Issue solved.We changed modified the group name with vi.

No reboot required.

Regards/himacs
No├й
Valued Contributor

Re: group file error

ok.
Michael Steele_2
Honored Contributor

Re: group file error

a) You do not want to change the group name 'root' to something else. If you do then you will put the O/S into an unknown state that is possibly unbootable and definitely unsupported by HP. If HP were discover this then HP would insist that you change it back and put the O/S back into a Known state BEFORE ASSISTING YOU.

In short, you are violating your contract with HP.

This isn't linux. Linux is an open source O/s developed by hobbyist all who retain the right to continue to make changes to the O/S.

HP-UX is copyrighted. That's the difference.

b) There is no alternative to vipw for /etc/group. make a backup and make your changes with the vi editor.

c) there is an /etc/shadow password file and you may or may not be prompted to update this if you vipw but not /etc/group.

d) if you are using sudo then be aware that sudo is group file based and you may be changing a sudo configuration if you change the /etc/group file.
Support Fatherhood - Stop Family Law
Bill Hassell
Honored Contributor

Re: group file error

vipw cannot edit anything except /etc/passwd. There are no options or arguments so all it does is edit passwd and setting a lock file.

Of course you can edit /etc/group at any time. It is simply a translation file for commands like ll. The ll (ls -l) command gets the group ID (GID) from the inode for a file and then looks up a more user-friendly name in /etc/group. So you can change it at anytime and basic filesystem handling doesn't change. If you use the chmod or chggrp command, you can bypass the group file by using a GID number. The only things that would be affected are commands and programs that use the symbolic name rather than the GID.

So the group Root is probably the first entry. Just fix Root to root and you are done.


Bill Hassell, sysadmin