LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-07-2012, 07:34 PM   #1
cbaldwin12
LQ Newbie
 
Registered: Dec 2010
Posts: 2

Rep: Reputation: 0
passwd change script


Eoes any one have a simple script I can use to change passwds for all users in every non-global zones per server? BASH or ksh please.
Thanks,
Chris
 
Old 05-07-2012, 07:42 PM   #2
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.x
Posts: 18,434

Rep: Reputation: 2790Reputation: 2790Reputation: 2790Reputation: 2790Reputation: 2790Reputation: 2790Reputation: 2790Reputation: 2790Reputation: 2790Reputation: 2790Reputation: 2790
This answer assumes you mean Solaris 10 zones.

I think the simplest way would be to write a simple change_passwd.ksh script and copy to each non-global zone and run it locally there.
You could try to do it all from the global zone via an ssh script that logs in to non-global zones, but it would be messy to do and error check.
I know you can cd (if root) down from the global into a non-global zone, but you're still in global zone context.
I don't know of a way to switch context into non-global when you get there.
 
Old 05-11-2012, 06:35 PM   #3
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,795

Rep: Reputation: 496Reputation: 496Reputation: 496Reputation: 496Reputation: 496
A robust way would be to set up your global zone as a NIS master or LDAP server and to centralize password management using these protocols.

Alternatively, a quick and dirty way would be to set the password in one zone and copy/paste the /etc/shadow entry in all remaining zones.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to change passwd policy? fjkum Linux - Newbie 1 04-09-2008 01:11 AM
Change Passwd Format shipon_97 Linux - Newbie 1 01-09-2007 08:13 AM
ow to create script change a user's password? passwd expects input from keyboard.. Arodef Linux - General 1 03-02-2005 10:40 PM
Initial passwd change liguorir Linux - Software 0 09-24-2004 11:01 AM
need a script that can change the passwd bahadur Linux - Security 1 07-09-2004 05:07 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:12 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration