Submitted by dukejustice on Fri, 10/22/2010 - 10:32
Hi.
Is there an option in Virtualmin Pro that allows me to copy a directory with its content to all homes and change their ownership?
Is there a place where I can put my directory so it gets added automatically everytime I add a ner domain to virtualmin pro?
I configured host ssh access to one account and I would like to copy .ssh/* to all homes of all domains so that I could login with ssh into all accounts without a password from my work computer.
Thanks
Marc
Status:
Active
Comments
Submitted by dukejustice on Fri, 10/22/2010 - 10:33 Comment #1
edit to subscribe
Submitted by andreychek on Fri, 10/22/2010 - 10:38 Comment #2
Is there a place where I can put my directory so it gets added automatically everytime I add a ner domain to virtualmin pro?
Yup! Anything you put into the "/etc/skel" directory will be copied out to each new Virtual Server, and will be given the correct permissions/ownership.
That only works for new Virtual Servers, there isn't an automated way of doing that after a Virtual Server has been created.
Submitted by dukejustice on Fri, 10/22/2010 - 10:45 Comment #3
Thanks.
Regards
Marc
Submitted by andreychek on Fri, 10/22/2010 - 10:47 Comment #4
What about my 1st question?
Sorry, I wasn't very clear... that's what I was referring to when I mentioned that there isn't an automated way to do that after the Virtual Servers are created.
To copy files to all homes and change ownership, you'd need to create a script that does that.
You could have it look at all the accounts setup in /etc/passwd (or perhaps use the Virtualmin command line tools), and then copy out the files that you have. But unfortunately, there isn't a existing tool that will handle that for you.
Submitted by dukejustice on Fri, 10/22/2010 - 10:51 Comment #5
Ho...
Last question...
In the /etc/skell... If I chmod -R 600 my .ssh directory...
Will it keep these perms when new domains are added and the skel copied?
Regards
Marc
Submitted by JamieCameron on Fri, 10/22/2010 - 12:06 Comment #6
Yes, permissions will be kept on copied files and directories..