[wplug] BASH
bgtrio at yahoo.com
bgtrio at yahoo.com
Fri May 9 16:38:19 EDT 2003
I'm not sure how to solve the bash problem, but su has an option "-c" that
lets you just execute a single command as the user in question. This
should solve your problem.
Bryguy
On Fri, 9 May 2003 vze2f6h6 at verizon.net wrote:
> I have been reading the TLDP.org's howto for Advanced Bash scripting but still can't figure this out. Here is my script.
>
> for name in $(awk '{print $1)' < "./user")
> do
> echo "$name";
> /usr/sbin/useradd $name;
> /bin/su $name;
> /var/qmail/bin/maildirmake ~/Maildir;
> XXXXXX
> /usr/sbin/usermod -s /sbin/nologin $name;
> done
>
> exit 0
>
> Now the problem is where the XXXXXX is in the script. I want to exit out of the "su". Everything that I try just exits me from the script.
>
> Thanks,
>
> Chris Romano
>
>
> _______________________________________________
> wplug mailing list
> wplug at wplug.org
> http://www.wplug.org/mailman/listinfo/wplug
>
--
http://www.livejournal.com/~bryguypgh
More information about the wplug
mailing list