![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| EOF checking the below | ramkrix | High Level Programming | 10 | 03-11-2008 01:43 AM |
| checking for non-zero value | philplasma | UNIX for Dummies Questions & Answers | 6 | 01-08-2008 04:51 PM |
| Checking cp progress | MarGur | UNIX for Dummies Questions & Answers | 0 | 05-15-2007 05:13 PM |
| Checking for PXE | maestro@altiris | SUN Solaris | 5 | 05-25-2004 01:06 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
checking uid
How do i go about getting the uid of the user and verify ?
Code:
if [ $uid != 'root' ]
then
echo "You are not a superuser, please login as a superuser"
exit1;
fi
1. how to get the uid of the user ? i know by typing id but how to get the script to verify its a su? 2. how do i exit the whole script if he/she is not a su? 3. Is the above, able to continue the rest of the process if its a su? -Thanks & Regards- |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|