(command.CommandList children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:homedir) op: assign_op.Equal rhs: {(DQ <'/home'>)} spids: [11] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:pwfile) op: assign_op.Equal rhs: {(DQ <'/etc/passwd'>)} spids: [16] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:shadow) op: assign_op.Equal rhs: {(DQ <'/etc/shadow'>)} spids: [22] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:newpwfile) op: assign_op.Equal rhs: {(DQ <'/etc/passwd.new'>)} spids: [27] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:newshadow) op: assign_op.Equal rhs: {(DQ <'/etc/shadow.new'>)} spids: [33] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:locker) op: assign_op.Equal rhs: {(DQ <'/etc/passwd.lock'>)} spids: [38] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {<-z>} {($ Id.VSub_Number '$1')} {<Id.Lit_RBracket ']'>}) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.Sentence child: (command.Simple words: [{<echo>} {(DQ <'Usage: '> ($ Id.VSub_Number '$0') <' account'>)}] redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})] do_fork: T ) terminator: <Id.Op_Semi _> ) (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>}) ] spids: [44 56] ) (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {(DQ (command_sub left_token:<Id.Left_DollarParen '$('> child:(C {<whoami>})))} {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} {(DQ <root>)} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.Sentence child: (command.Simple words: [{<echo>} {(DQ <'Error: you must be \'root\' to run this command.'>)}] redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})] do_fork: T ) terminator: <Id.Op_Semi _> ) (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>}) ] spids: [75 96] ) ] ) (C {<suspenduser>} {($ Id.VSub_Number '$1')}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:uid) op: assign_op.Equal rhs: { (DQ (command_sub left_token: <Id.Left_DollarParen '$('> child: (command.Pipeline children: [ (C {<grep>} {<-E>} {(DQ <'^'> (${ Id.VSub_Number 1) <':'>)} {($ Id.VSub_DollarName '$pwfile')} ) (C {<cut>} {<-d> <Id.Lit_Colon ':'>} {<-f3>}) ] negated: F ) ) ) } spids: [123] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {<-z>} {($ Id.VSub_DollarName '$uid')} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.Sentence child: (command.Simple words: [ {<echo>} { (DQ <'Error: no account '> ($ Id.VSub_Number '$1') <' found in '> ($ Id.VSub_DollarName '$pwfile') ) } ] redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})] do_fork: T ) terminator: <Id.Op_Semi _> ) (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>}) ] spids: [152 164] ) ] ) (command.Simple words: [ {<grep>} {<-vE>} {(DQ <'^'> (${ Id.VSub_Number 1) <':'>)} {($ Id.VSub_DollarName '$pwfile')} ] redirects: [ (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {($ Id.VSub_DollarName '$newpwfile')} ) ] do_fork: T ) (command.Simple words: [ {<grep>} {<-vE>} {(DQ <'^'> (${ Id.VSub_Number 1) <':'>)} {($ Id.VSub_DollarName '$shadow')} ] redirects: [ (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {($ Id.VSub_DollarName '$newshadow')} ) ] do_fork: T ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:lockcmd) op: assign_op.Equal rhs: {(DQ (command_sub left_token:<Id.Left_DollarParen '$('> child:(C {<which>} {<lockfile>})))} spids: [227] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {<Id.KW_Bang '!'>} {<-z>} {($ Id.VSub_DollarName '$lockcmd')} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (C {<eval>} {($ Id.VSub_DollarName '$lockcmd')} {<-r>} {<15>} {($ Id.VSub_DollarName '$locker')} ) ] spids: [239 253] ) ] else_action: [ (command.WhileUntil keyword: <Id.KW_While while> cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {<-e>} {($ Id.VSub_DollarName '$locker')} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) body: (command.DoGroup children: [ (command.Sentence child: (C {<echo>} {(DQ <'waiting for the password file'>)}) terminator: <Id.Op_Semi _> ) (C {<sleep>} {<1>}) ] ) ) (C {<touch>} {($ Id.VSub_DollarName '$locker')}) ] ) (C {<mv>} {($ Id.VSub_DollarName '$newpwfile')} {($ Id.VSub_DollarName '$pwfile')}) (C {<mv>} {($ Id.VSub_DollarName '$newshadow')} {($ Id.VSub_DollarName '$shadow')}) (C {<rm>} {<-f>} {($ Id.VSub_DollarName '$locker')}) (C {<chmod>} {<644>} {($ Id.VSub_DollarName '$pwfile')}) (C {<chmod>} {<400>} {($ Id.VSub_DollarName '$shadow')}) (C {<rm>} {<-rf>} {($ Id.VSub_DollarName '$homedir') <'/'> ($ Id.VSub_Number '$1')}) (C {<echo>} {(DQ <'Files still left to remove (if any):'>)}) (command.Pipeline children: [ (command.Simple words: [{<find>} {<'/'>} {<-uid>} {($ Id.VSub_DollarName '$uid')} {<-print>}] redirects: [(redir op:<Id.Redir_Great '2>'> loc:(redir_loc.Fd fd:2) arg:{<'/dev/null'>})] do_fork: T ) (C {<sed>} {(SQ <'s/^/ /'>)}) ] negated: F ) (C {<echo>} {(DQ )}) (C {<echo>} { (DQ <'Account '> ($ Id.VSub_Number '$1') <' (uid '> ($ Id.VSub_DollarName '$uid') <') has been deleted, and their home directory '> ) } ) (C {<echo>} { (DQ <'('> ($ Id.VSub_DollarName '$homedir') <'/'> ($ Id.VSub_Number '$1') <') has been removed.'>) } ) (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<0>}) ] )