On 8/20/06, Dennis Clarke <[EMAIL PROTECTED]> wrote:
> On 8/19/06, Dennis Clarke <[EMAIL PROTECTED]> wrote: >> >> >> grep -v root shadow > /tmp/rootless_shadow >> /usr/bin/echo "root::13380::::::" > root_stuff >> cat root_stuff rootless_shadow > new_shadow > > earlier i pressed reply instead of reply all in gmail, it happens :P > cant he use sed? > sed 's/^root:[^:]*:\(.*\)/root::\1/' /etc/shadow > ( please triple check that ) > should return the same /etc/shadow but without the password field for > the root user, who needs vi when you have tools like that? ;) > My first thought was sed also but that thought was pressed up against the wall by another thought about how the guy didn't know vi and then yet another thought ganged up on the sed thought which felt that he was probably a little new and maybe the sed thought should know when to run for cover.
i'm not exactly the average user, i hate vi, i really do; and i love sed and regular expresions so when i saw the problem, i thought sed was the natural way to solve it. anyway, save the result of that sed command in a file and replace the current shadow with it, please remember to set proper permisions to the new shadow file showing users how to use the tools they regularly use to solve a problem is a good thing but we should also them there are tools that are better suited for the problem :) nacho _______________________________________________ opensolaris-discuss mailing list [email protected]
