DIGIT-ARC read-only archive · snapshot: July 23, 2026

Unix Shell Script: su command help

4 posts · originally from https://geek.digit.in/community/threads/unix-shell-script-su-command-help.126948/

speedyguy
speedyguy Original post #1
May 16, 2010 at 3:14 PM
i did found some help by googling but m still unanswered...

my aim is to create a login screen for a user/super user..... but using a shell script if i give su command or any login command a child process is created n m sent 2 its terminal....the program exec is at hault unless i exit that shell....

i want to continue my program exexution aftr the login for further operations in my project.... can any1 help me out?

Thanks.

Enjoy~!
khmadhu
khmadhu #2
May 16, 2010 at 8:58 PM
try with sudo command. this will execute the command at super user terminal and comes back to user terminal.. u need to add users in sudoers file /etc/sudoers, meanwhile u can also try by putting the the job background. using '&' at the end of each command.
parthbarot
May 19, 2010 at 10:59 AM
And also you need to get the exit status from command. So that you can show proper message for what happened in login
speedyguy
May 22, 2010 at 11:12 PM
will have 2 learn abt sudo....ya meanwhile i can try out that background process....i doubt it wud work but will update here...thanks

Enjoy~!