Operating System - HP-UX
1748112 Members
3530 Online
108758 Solutions
New Discussion юеВ

Re: 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 5
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
Dennis Handly
Acclaimed Contributor

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