User vs Group
Recently in my CentOS application server I found that one particular users group has been chaned to users but noot the group that belong to the same user name :confused:
I tried serveral linux command like chown but it is not changing from user to the name of the user. For yout information herewith I attch a screenshot of that particular user gruop
The particular user name is highlighted. What is the proper command pls?
It isn't clear from your post exactly what you are trying to do. Are you trying to change the owner of a directory(?) or change the group or change the group. The output in your thumbnail is too small to read, at least for me. You could post the examples in quote tags. Please clarify.
Im sorry Yancek. Please find the high resolution image herewith. I want to change users group to a group where by his own name for exampl if the username is amitha his group name shoul also amitha
I'm with yancek here, it is unclear to me what exactly you want to achieve.
You can change the group ownership with the command "chgrp". You can change both the user and group ownership with the command "chown".
eg. chgrp users directory (change the group of directory)
chown -R fred:user directory (changes the user and group of directory and everything below it)
Cheers - VP
Originally Posted by voidpointer69
Thanks for the reply. The thing is this. The output of the imaage I attched comes for the command ls -ltr
All the other users accounts except the user in question appear differenty
Ex - drwx------ 3 amitha amitha (correct output with no isues)
drwx------ 3 santhus user ( the user acount in question. This belong to user group not like the previous users group):?
You can change the primary group of a user with the usermod command, see the link below for an example.
How can I change a user's default group in Linux? - Unix and Linux
Originally Posted by yancek
amithad, Check out /etc/passwd for the user in question. It's possible that the user is attached to many groups and "user" is one (the first in the list?) of them. If that turns out to be the case, edit passwd file.
Cheers - VP