(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: [ (command.Sentence child: (C {(Id.Lit_LBracket '[')} {(-z)} {($ Id.VSub_Number '$1')} {(Id.Lit_RBracket ']')}) terminator: (Token id:Id.Op_Semi val:';' span_id:54) ) ] action: [ (command.Sentence child: (command.Simple words: [{(echo)} {(DQ ('Usage: ') ($ Id.VSub_Number '$0') (' account'))}] redirects: [ (redir.Redir op: (Token id:Id.Redir_GreatAnd val:'>&' span_id:67) fd: -1 arg_word: {(2)} ) ] ) terminator: (Token id:Id.Op_Semi val:';' span_id:69) ) (command.ControlFlow token: (Token id:Id.ControlFlow_Exit val:exit span_id:71) arg_word: {(1)} ) ] spids: [44 56] ) (if_arm cond: [ (command.Sentence child: (C {(Id.Lit_LBracket '[')} { (DQ (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:80) command_list: (command.CommandList children:[(C {(whoami)})]) ) ) } {(Id.KW_Bang '!') (Id.Lit_Equals '=')} {(DQ (root))} {(Id.Lit_RBracket ']')} ) terminator: (Token id:Id.Op_Semi val:';' span_id:94) ) ] action: [ (command.Sentence child: (command.Simple words: [{(echo)} {(DQ ("Error: you must be 'root' to run this command."))}] redirects: [ (redir.Redir op: (Token id:Id.Redir_GreatAnd val:'>&' span_id:104) fd: -1 arg_word: {(2)} ) ] ) terminator: (Token id:Id.Op_Semi val:';' span_id:106) ) (command.ControlFlow token: (Token id:Id.ControlFlow_Exit val:exit span_id:108) 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: (Token id:Id.Left_DollarParen val:'$(' span_id:125) command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {(grep)} {(-E)} {(DQ ('^') (${ Id.VSub_Number 1) (':'))} {($ Id.VSub_DollarName '$pwfile')} ) (C {(cut)} {(-d) (Id.Lit_Other ':')} {(-f3)}) ] negated: F ) ] ) ) ) } spids: [123] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(Id.Lit_LBracket '[')} {(-z)} {($ Id.VSub_DollarName '$uid')} {(Id.Lit_RBracket ']')}) terminator: (Token id:Id.Op_Semi val:';' span_id:162) ) ] action: [ (command.Sentence child: (command.Simple words: [ {(echo)} { (DQ ('Error: no account ') ($ Id.VSub_Number '$1') (' found in ') ($ Id.VSub_DollarName '$pwfile') ) } ] redirects: [ (redir.Redir op: (Token id:Id.Redir_GreatAnd val:'>&' span_id:176) fd: -1 arg_word: {(2)} ) ] ) terminator: (Token id:Id.Op_Semi val:';' span_id:178) ) (command.ControlFlow token: (Token id:Id.ControlFlow_Exit val:exit span_id:180) arg_word: {(1)} ) ] spids: [152 164] ) ] ) (command.Simple words: [ {(grep)} {(-vE)} {(DQ ('^') (${ Id.VSub_Number 1) (':'))} {($ Id.VSub_DollarName '$pwfile')} ] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:204) fd: -1 arg_word: {($ Id.VSub_DollarName '$newpwfile')} ) ] ) (command.Simple words: [ {(grep)} {(-vE)} {(DQ ('^') (${ Id.VSub_Number 1) (':'))} {($ Id.VSub_DollarName '$shadow')} ] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:222) fd: -1 arg_word: {($ Id.VSub_DollarName '$newshadow')} ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:lockcmd) op: assign_op.Equal rhs: { (DQ (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:229) command_list: (command.CommandList children:[(C {(which)} {(lockfile)})]) ) ) } spids: [227] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(Id.Lit_LBracket '[')} {(Id.KW_Bang '!')} {(-z)} {($ Id.VSub_DollarName '$lockcmd')} {(Id.Lit_RBracket ']')} ) terminator: (Token id:Id.Op_Semi val:';' span_id:251) ) ] action: [ (C {(eval)} {($ Id.VSub_DollarName '$lockcmd')} {(-r)} {(15)} {($ Id.VSub_DollarName '$locker')} ) ] spids: [239 253] ) ] else_action: [ (command.WhileUntil keyword: (Token id:Id.KW_While val:while span_id:276) cond: [ (command.Sentence child: (C {(Id.Lit_LBracket '[')} {(-e)} {($ Id.VSub_DollarName '$locker')} {(Id.Lit_RBracket ']')} ) terminator: (Token id:Id.Op_Semi val:';' span_id:286) ) ] body: (command.DoGroup children: [ (command.Sentence child: (C {(echo)} {(DQ ('waiting for the password file'))}) terminator: (Token id:Id.Op_Semi val:';' span_id:297) ) (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.Redir op: (Token id:Id.Redir_Great val:'2>' span_id:382) fd: 2 arg_word: {(/dev/null)} ) ] ) (C {(sed)} {(SQ (Token id:Id.Lit_Chars val:'s/^/ /' span_id:390))}) ] 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:(Token id:Id.ControlFlow_Exit val:exit span_id:420) arg_word:{(0)}) ] )