I am new to Solaris 10 (at least to using Zones on it)
I have just been handed a bunch of servers with zones already created. and I am adding users, setting up .bash_profile and .bashrc scripts.
Does anyone know a way to do things like user adds on all the non-global zones at once? Is this possible? Or do i have to log into each zone as if it were a separate server?
Also, as far as the .bashrc, I know I can propagate it to each user's /home directory, but then I have to do a chown on each one afterward. Is there any way I can place it into the user's /home directory and take on that users ownerships?
I have played around using for loops to reach down into the zones to gather information, as in the for loop below, but executing commands and chowning files adds more complexity than I am comfortable with as far as scripting goes:
# for i in `ls /export/home/zones`
> do
> zlogin $i hostname
> zlogin $i ifconfig -a
> done
If you are adding individual users to individual hosts (ie: not using NIS/LDAP/AD), you should consider adding common home directory files to the skeleton directory. When running useradd, remember that there is a flag to copy the skeleton 'stuff' to the user's home directory.
From "man useradd"
Look for:
pick a place for your skeleton directory that you can easily propagate to your various hosts (rsync/nfs/scp), then when you create new users, they will have the common .bashrc file (and others that you identify)
thanks, /etc/skel is a good option for me. One question though. I don't mind if the user owns their .bashrc, but I want root to own .bash_profile upon user creation. If I put .bash_profile into /etc/skel, it will be woned by the user.
I am wondering if I make it a link in /etc/skel will it propagate as a link upon user creation? Or will I cause some damage by putting a link in /etc/skel?
oops! Not sure how this is happening, but now whenever I do a useradd, the .bash_profile inder root takes on the ownerships of the user I just created. not a catastrophe, but rather annoying.
I would say what you observe is the expected behavior. The useradd command is doing a chown on the newly created files which propagates to the symlinked root .bash_profile in your special case.
Hi, hoping someone can help, its been a while since I used Solaris.
After creating a NGZ (non global zone), the NGZ can access the GZ (Global Zone) and the GZ can access the NGZ (using ssh, zlogin)
However, the NGZ cannot access any other netwqork devices, it can't even see the default router
... (2 Replies)
I am planning to do solaris 11 global zone patching having solaris 10 branded zone. I have a doubts on step 8 specially
Can someone clear my step 8 doubts or if anything wrong between step 1 to step 9 please correct that also as I have pretty good idea about Step 10 mean patching in solaris 10... (2 Replies)
Dear all,
recently, I migrated a solaris zone from one host to another. The zone was inside of a zpool. The zpool cotains two volumes.
I did the following:
host1:
$ zlogin zone1 shutdown -y -g0 -i0 #Zone status changes from running to installed
$ zpool export zone1
host2:
$ zpool... (2 Replies)
hi frnds
I created sparse root zone, in that zone when i try to change the passwd it is giving permission denied.
what is the reason and how to chnage the root passwd in the zone. can u please explain the query. (4 Replies)
Hi All ,
I try to install some packages in my global zone...
On the execution of the installion of the script it quits by saying the error
"Non global zone check failed"
Kindly help me in this regard
Thanks in advance,
jeganr (7 Replies)