Find the answer to your Linux question:
Results 1 to 8 of 8
Hello, 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 ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Newbie amithad's Avatar
    Join Date
    Sep 2006
    Location
    Sri Lanka
    Posts
    160

    Smile User vs Group


    Hello,

    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

    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?

    Thanks
    Attached Images Attached Images

  2. #2
    Linux Guru
    Join Date
    Oct 2007
    Location
    Tucson AZ
    Posts
    3,190
    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.

  3. #3
    Linux Newbie amithad's Avatar
    Join Date
    Sep 2006
    Location
    Sri Lanka
    Posts
    160
    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
    User_Issue.jpg


    many thanks

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Newbie
    Join Date
    Nov 2009
    Posts
    228
    amithad.

    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

  6. #5
    Linux Newbie amithad's Avatar
    Join Date
    Sep 2006
    Location
    Sri Lanka
    Posts
    160
    Quote Originally Posted by voidpointer69 View Post
    amithad.

    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
    Hi 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)

  7. #6
    Linux Guru
    Join Date
    Oct 2007
    Location
    Tucson AZ
    Posts
    3,190
    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

  8. #7
    Linux Newbie amithad's Avatar
    Join Date
    Sep 2006
    Location
    Sri Lanka
    Posts
    160
    Quote Originally Posted by yancek View Post
    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
    Thanks Yancek

  9. #8
    Linux Newbie
    Join Date
    Nov 2009
    Posts
    228
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •