Hello, I'll begin with your second question. To have a message to all system users by editing /etc/motd. If you are specific that the message must only be sent to members of the family group,you may be have to write your own script that would run when each user logs in and would check if they are a member of the group family before executing to completion.
Ill, give you some heads up on getting the groups to which a user belongs
Quote:
groups $USER | awk -F: '{ print $2 }'
|
On to your first question, the script should be run from an account with privileges to access(read and write) all other users home directories. Like, root. And this script should be started from root's home directory. A script created in a particular users domain can only run in that users domain.