I have not tried anything yet, I just found that for some reason when users are created, it is not creating the .profile in the users home dir and we just had a software upgrade installed that now requires the .profile to be in the home dir. I am very new to SCO and since this is a production environment I do not want to do anything to mess up the system. I have found two scripts that looks like they could be modified to work.
#!/bin/tcsh
foreach u ( /home/user /home/user1 /home/user2 /home/user3 )
foreach f ( /full/path/to/file /full/path/to/anotherfile )
echo $u
cp $f ${u}:$f
end
end
or
# /etc/passwd /usr/private/admin/passwd
Copy the password to a secure (700) area owned by root.
I believe you will need to create a text file containing all the usernames. Use this text file to feed your script.
This is how I'd do this, your situation may differ:
# cd /usr
# ls >ulist
(Now edit "ulist" to remove non-login names (such as "spool", "include", etc.) This is the hard part.
Create your sample .profile script, name it /tmp/profile.
Run these commands:
# cd /usr
# for i in `cat ulist`
# do
cp /tmp/profile /usr/$i/.profile
chown $i /usr/$i/.profile
chmod 600 /usr/$i/.profile
done
#
You can always test the script first by just including a single userid in the /usr/ulist file.
To fix your REAL issue (no .profile), take a look in the /usr/lib/mkuser/sh directory. This is the source location for the default $HOME directory stuff.
"Proof that there is intelligent life in Oregon. Well, Life anyway.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.