Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: useradd with perl and cron

by true (Pilgrim)
on Jun 11, 2003 at 06:25 UTC ( [id://264966]=note: print w/replies, xml ) Need Help??


in reply to useradd with perl and cron

putting the full path of useradd solved the problem. "whereis useradd" told me where it was. The script could not find useradd. Also, root.pl should set the new user's shell parameter(-s) to "/bin/false". This turns off shell access to the new user.

jtrue

Replies are listed 'Best First'.
Re: Re: useradd with perl and cron
by tachyon (Chancellor) on Jun 11, 2003 at 11:58 UTC

    What about the case where two virtual users want to be info@mydomain.com and info@over.here.com? Or joe or john or blah???

    In this case you (possibly) need a single info, joe, john, etc account on the box (so it will accept the mail) but you need to modify the virtuser table for sendmail (if that is what you are using) to redirect the info@... mail to the correct users. Note procmail will not work as the mail headers on the envelope are stripped by the time procmail gets to see a given message.

    FYI there are many ways to configure sendmail to accept and redirect mail. Maybe you should RTFM as you are definitely not the first person to strike this problem, and there are several ways to skin this particular cat. As suggested by Zaxo while your solution will work it is not highly recommended. Procmail is also a useful widget in a number of circumstances. For example you can direct all mail for *@domain.com to a single shell account, have procmail intercept it and redistribute it to any number of email accounts - either local or remote. Voila - infinite virtual POP boxes without infinite shell accounts.

    cheers

    tachyon

    s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://264966]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (2)
As of 2024-04-25 07:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found