Ops I've just been catching up on me list reading, I'd better go and look at $> and $< then. Dow
Brian -----Original Message----- From: Brian Ling Sent: 17 June 2003 09:45 To: '[EMAIL PROTECTED]' Subject: Run as a different user Hi all, I find myself with a rather odd problem, part of a script I'm working on needs to be run as root, another part of the same script need to be run as a different user. The script is started by root, how can I then switch to a different user for a given subroutine/section. The only way I could think of doing this is using a system command with "sudo -u username /pathToASeperatePerlScript. However this would need to get called 2 or 3 times loading the same modules each time etc. Can anyone give me a pointer to a better way? Cheers Brian BBCi at http://www.bbc.co.uk/ This e-mail (and any attachments) is confidential and may contain personal views which are not the views of the BBC unless specifically stated. If you have received it in error, please delete it from your system, do not use, copy or disclose the information in any way nor act in reliance on it and notify the sender immediately. Please note that the BBC monitors e-mails sent or received. Further communication will signify your consent to this. BBCi at http://www.bbc.co.uk/ This e-mail (and any attachments) is confidential and may contain personal views which are not the views of the BBC unless specifically stated. If you have received it in error, please delete it from your system, do not use, copy or disclose the information in any way nor act in reliance on it and notify the sender immediately. Please note that the BBC monitors e-mails sent or received. Further communication will signify your consent to this. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]