Operating System - HP-UX
1834514 Members
2530 Online
110068 Solutions
New Discussion

transfer owner from deleted user to new one

 
SOLVED
Go to solution
Carles Viaplana
Valued Contributor

transfer owner from deleted user to new one

Hello,

When I delete a user using SAM system asks me if I want to transfer all files from this user to new one.

Does this option transfer owner for ALL files or just these from home directory?

Thanks in advance for your help.
Regards,

Carles
4 REPLIES 4
Pedro Cosmen
Valued Contributor
Solution

Re: transfer owner from deleted user to new one

Carles,

It will transfer all files.

Regards
Pete Randall
Outstanding Contributor

Re: transfer owner from deleted user to new one

I just ran a little test and it transferred files in the user's home directory and a test file I had placed directly under /home. So, I did another test with a file under /tmp and it also transferred the /tmp file.

It would appear that it transfers ALL files.


Pete

Pete
James R. Ferguson
Acclaimed Contributor

Re: transfer owner from deleted user to new one

Hi Carles:

Should you wish to find "un-owned" files, do:

# find / -type f -nouser | xargs ls -l

...or files with no defined group:

# find / -type f -nogroup | xargs ls -l

...or to restrict searches to a particular mountpoint:

# find /path -xdev -type f -nouser | xargs ls -l

...of course having found files you can 'chown' them to someone or some group at that time:

# find /path -xdev -nouser | xargs chown bin:bin

...to find both files and directories that in '/path' that are unowned and should be changed to belong to the user 'bin' with a group of 'bin' too.

Regards!

...JRF...
Carles Viaplana
Valued Contributor

Re: transfer owner from deleted user to new one

Thanks to all for your help!

Regards,

Carles