Archive for July, 2008

How to quickly (batch) make new /home/dir

Say you have a new machine, and it is not on NIS or LDAP, it needs to be really secure and only have local accounts. So you need to make a bunch of local accounts, but you need to leave for lunch in a half hour. Well simply use this short simple script to make them and set the proper permissions in a matter of seconds. Below is a sample script, I suggest calling is something like createuserhomedir.sh. We are assuming that there is a file called users which has all the user’s name that we want to make in the same directory as the script.

#!/bin/sh
mkdir=/bin/mkdir

echo “echoing users”
cat ./users
echo “end echoing users”
echo “Making Home Directories”
for i in `cat ./users`
do
mkdir /export/home/$i
echo “Fixing Permissions For $i Home DIR’s”
chown -R $i:other /export/home/$i
done

Comments

Upgrade Sun Microsystems OBP (OpenBoot PROM) with tftp

Why is this soo cool? Because the default way to upgrade the OBP is to have a running system. But some times

If you have a working jump start enviroment most of the work is already done, yaha. You actully dont even have to use a solaris box to act as the upgrade server any tftp server will do.

So basically what I did here is used a already set up jump start server to upgrade the OBP on a Sun Fire v240. I deleted the link to the solaris kernel and created a symlink from the mac address to the upgrade binary.

bash-3.00# pwd
/tftpboot
bash-3.00# ls -l
total 458
lrwxrwxrwx 1 root root 27 Jun 6 11:40 0A2483F9 -> inetboot.SUN4U.Solaris_10-1
lrwxrwxrwx 1 root root 27 Jun 6 11:40 0A2483F9.SUN4U -> inetboot.SUN4U.Solaris_10-1
-rwxr-xr-x 1 root root 217016 Jun 6 11:40 inetboot.SUN4U.Solaris_10-1
drwxr-xr-x 2 root root 512 Jun 5 12:07 ODBUpgrade
-rw-r–r– 1 root root 321 Jun 6 11:40 rm.10.36.131.249
lrwxrwxrwx 1 root root 1 Jun 5 10:23 tftpboot -> .

bash-3.00# ls -l ODBUpgrade/
total 7888
-rw-r–r– 1 root root 1482292 Jun 5 12:07 flash-update-Blade100
-rw-r–r– 1 root root 2534420 Jun 5 12:07 flash-update-SunFire240

Comments

« Previous Page « Previous Page Next entries »