RE: help with sed with solaris/linux password script
- From: creydog doma <ponetguy2@xxxxxxxxx>
- Date: Tue, 27 Mar 2007 15:12:50 -0700 (PDT)
I had great replies and suggestions. Thank you again to everyone.
I know this is not the place to ask Linux questions, but the script broke the shadow file on our Linux servers. It worked great on our Solaris machines, but I need to figure out why the shadow file got zeroed and the backup was not created in /tmp.
Here is the revised script:
#!/bin/sh
echo "setting password for user"
# set the user password
PASSWD=passwordhere
/usr/bin/cp /export/home/scripts/passwords/shadow /export/home/scripts/passwords/shadow.orig
/usr/bin/sed -e "s/user:[^:]*\(.*\)/user:$PASSWD\1/" /export/home/scripts/passwords/shadow.orig > /export/home/scripts/passwords/shadow
/usr/bin/chmod 400 /export/home/scripts/passwords/shadow
Please help :)
---------------------------------
We won't tell. Get more on shows you hate to love
(and love to hate): Yahoo! TV's Guilty Pleasures list.
_______________________________________________
sunmanagers mailing list
sunmanagers@xxxxxxxxxxxxxxx
http://www.sunmanagers.org/mailman/listinfo/sunmanagers
- Prev by Date: pkginfo db recovery
- Next by Date: RE: Solaris 8 multiple logins
- Previous by thread: help with sed with solaris/linux password script
- Next by thread: SUMMARY: UFS within UFS
- Index(es):