[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Scripting question



yeah that is a option.  See the problem/reason I need this is I am having a
problem whereas if a user gets a timeout whilst doing a POP3 retrieve it
locks their mailbox, but will not unlock, you can delete the pop.lock file,
chmod the spool file, but will not unlock and for example, in pine, it reads
that the mailbox is READ ONLY! and will not delete any mail, only ELM will
delete the mail from a spool file whilst in this READ ONLY mode, have any
ideas on where this would be set and why it does not unlock after time.

Regards
Nathan

> From: tps@unslept.com
> Date: Mon, 8 Jan 2001 19:00:57 -0500
> To: Nathan Ridge <ridgey@mackay.matilda.net.au>
> Cc: Debian Mailing List <debian-isp@lists.debian.org>
> Subject: Re: Scripting question
> 
> On Tue, Jan 09, 2001 at 10:08:05AM +1100, Nathan Ridge wrote:
>> I am trying to write a script for a couple of novice admins that changes
>> shell to bash from false, logs in, runs elm from where they can purge
>> certain emails from a users mailbox and then exit to change the shell back
>> to false. So far I have:
>> 
>> #!/bin/bash
>> USR=$1
>> usermod -s /bin/bash $USR
>> su - $USR
>> elm
>> usermod -s /bin/false $USR
>> 
>> but when the su - changes accounts the script stops, any help appreciated.
> 
> As pointed out already, you need su - $USR -c "elm"
> 
> Also, instead of mucking about with the shell, you can use 'passwd -l
> username'
> to lock the account (if that is the ultimate goal) and then passwd -u username
> to unlock it.
> 
> Tim
> 
> -- 
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
>>> Tim Sailer (at home)             ><  Coastal Internet, Inc.          <<
>>> Network and Systems Operations   ><  PO Box 671                      <<
>>> http://www.buoy.com              ><  Ridge, NY 11961                 <<
>>> tps@unslept.com/tps@buoy.com     ><  (631) 476-3031                  <<
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
> 



Reply to: