Sorry, should have specified "and we don't want it to run suid root".
From looking at the situation, it seems that we should be able to run an RPC program that talks to the NetApp and tells us the quota. We just didn't want to have the program if we could avoid it. We're also a bit concerned that the kernel may restrict what we're trying to do. We haven't looked far enough into things to know if that's a real problem.
Thanks again.
-----Original Message----- From: Stephen C. Losen [mailto:scl@sasha.acc.virginia.edu] Sent: Wednesday, October 20, 1999 11:38 AM To: founder@teleport.com Cc: toasters@mathworks.com Subject: Re: Source for a non-root quota program?
main(int argc, char **argv) { setuid(0); argv[0] = "/usr/sbin/quota"; execv(argv[0], argv); }
Compile the above, chown it to root and make it set user with chmod u+s. It runs the standard quota command as root, passing through the command line args. Now you have a command that any user can run to report any quota. No need for suexec or cgiwrap.
We would like our support people to be able to do real-time quota verification for customers, meaning that support person A is able to tell customer B that they're using 9.688MB of their 10MB quota.
Having gone that far, we would actually really like to have a web page for our non-UNIX customers to check their usage. We can't use the normal /usr/ucb/quota program that comes with Solaris because it requires you to run as root to check someone else's usage. If we try to use suexec or cgiwrap to run programs as the user, we will have to make a copy of the script for every customer. This is sub-optimal.
So what we want is a program (Solaris preferred, Linux or NT might be acceptable) that will allow any user to check the total usage for any
other
user.
Seems like this would have come up with other people using NetApps extensively.
Does NetApp have an official program that does this? Possibly a program that someone has contributed?
Steve Losen scl@virginia.edu phone: 804-924-0640
University of Virginia ITC Unix Support