HPE Community read-only access December 15, 2018
This is a maintenance upgrade. You will be able to read articles and posts, but not post or reply.
Hours:
Dec 15, 4:00 am to 10:00 am UTC
Dec 14, 10:00 pm CST to Dec 15, 4:00 am CST
Dec 14, 8:00 pm PST to Dec 15, 2:00 am PST
System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

chown command execute perfectly but changes doesn''t come into effect

 
harjeet_3
Occasional Advisor

chown command execute perfectly but changes doesn''t come into effect

/etc/passwd has the following line for my login named "trng"
===
trng:cu1dvmx:105:20:,,,:/home/trng:/usr/bin/sh
====
/etc/group
users:20:root
=========
all the file i create gets the owner "hostmg" and group "users".

filename : try.sh

$usage:chown
$ll try.sh
$-rwxrwxrwx hostmg users 2586 11:53 try.sh

===>long listing of the file named try.sh
I tried to change the owner using the command chown as under
$chown trng try.sh
$ll try.sh
$-rwxrwxrwx hostmg users 2586 11:53 try.sh

no error has been displayed but the changes does not come into effect.

Ques#:Why the files of my login named "trng" gets the ownership of login named "hostmg" instead of "trng" ?

Ques: why the change after using the command chown has not come into effect as ll command has shown the same long listing detail as before.
5 REPLIES
TTr
Honored Contributor

Re: chown command execute perfectly but changes doesn''t come into effect

Most likely the users trng and hostmg have the same user ID, which is 105. Check this out and create another user ID to separate the user IDs for the the two users.
Mark McDonald_2
Trusted Contributor

Re: chown command execute perfectly but changes doesn''t come into effect

can you post the outputs of:

# id hostmg
and
# id trng

Re: chown command execute perfectly but changes doesn''t come into effect

Also try: ll -n try.sh
If you get 105, it did change it.
Bill Hassell
Honored Contributor

Re: chown command execute perfectly but changes doesn''t come into effect

Run the command:

logins -d

You should nothing reported. If you see any usernames and IDs, they have been duplicated, and this can be a security problem as well as annoying.


Bill Hassell, sysadmin
saravanan08
Valued Contributor

Re: chown command execute perfectly but changes doesn''t come into effect

Hi
just check the /etc/passwd for any uid conflicts for trng and hostmg