Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hi all
For example: I want my "su" command works only with user: "microsmart", so I am going to recompile its source code, but I donno where its source code is. Is it in /usr/src?? Nothing there in my Fedora.
Could anyone help me to rewrite source code of commands and recompile them.
Thank you very much.
You could just change the permission on the link in /bin, seems a lot easier than editing source code, in my opinion. You could also rename the su command to something obscure like linux_command_111 and edit your ~/.bashrc file adding the line
alias su="linux_command_111"
There are quiet a few options like this that are much quicker than changing the source code of a file. Also, just something to keep in mind, a person could bypass this by dropping out of X and loging in as root.
Wouldn't this be considered re-inventing the wheel
Sorry for the disturbance, but it really is true and the saying is quite fitting. It would be like writing a shell script to print the contents of a directory without the use of ls. I certainly wouldn't want to discourage someone from dabbling with source code and learning how things work, that is great, but if he just wants to limit who can use su, the solution is apparently simple.
Last edited by flower.Hercules; 09-28-2005 at 11:22 PM.
sorry -- sounded like to me he was just "tinkering"
he said "For example:"
there was a young guy once when i was in school who took a teletype machine home during the summer to tinker in his garage. his name was Bill Gates. He must have gotten something more out of it than just better system security. Most of us didn't know how to keep others out of our home directory so security was a big rubber band on a shoe box of rolled up ticker tape. Some of the guys had figured out how to "see" what was on the tape by looking at the hole patterns. Sometimes the wheel needs to be reinvented.
Computers in 30 years shouldn't any more be like computers of today than jets are like
hoarse and buggy. If they are then somethings wrong.
Last edited by foo_bar_foo; 09-29-2005 at 02:18 AM.
sorry -- sounded like to me he was just "tinkering"
he said "For example:"
You are right, my mistake; I guess he did just want to tinker around with commands.
Also a nice story, although, it would have been better if it was a tale of Linus or Stallman or some other OSS pioneer But now this is just way off-topic :/
there were some unix creators who fit into that story just as well or better.
shortly after that people in universities began to improve on those old building sized ibm mainframes by putting Unix on them.
you know really that object oriented analogy of the "wheel" also just has to be a bit overused.
i mean isn't the "su" tool really a bit more like a turn signal or the cup holder something.
the wheel implies some kind of core get up and moving kind of component.
perhaps the kernel or the filesystem or the laguage and compiler is the wheel.
or better yet seperate components of the wheel
but that need reenventing or at least redisigning.
come to think of it a jet may be better off without a wheel altogether.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.