![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| code that reads commands from the standard i/p and executes the commands | Phrozen Smoke | High Level Programming | 4 | 01-22-2007 02:06 AM |
| need help with some commands please | mujtba | UNIX for Dummies Questions & Answers | 2 | 01-14-2005 02:49 PM |
| sed commands | dbrundrett | Shell Programming and Scripting | 7 | 09-28-2004 06:11 PM |
| commands | kironpmullamkuz | Security | 2 | 06-28-2002 12:45 AM |
| BDS Commands | bbutler3295 | UNIX for Dummies Questions & Answers | 3 | 03-04-2002 08:28 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Cannot run commands
It would be helpful if someone could help me out here. The problem I have been having is that I cannot run some commands which are valid - whenever I try to run the command I get the message "command not found". Now, if I run the same command as root it executes. These commands do not have to be run as root for it to be executed, for example, if I run 'sysdef', 'prtconf' and even 'ifconfig' command I get the command not found message.
How can I get around this issue this issue? I am running an Solaris 10 on an x86 architecture. Rgds. |
|
||||
|
Root has things in its path that the normal user doesn't. So, as root, if you can run a program named sysdef, run this command: which sysdef
The response will be something like: /sbin/sysdef If the application truly doesn't require root permissions, then you should be able to run it as a regular user by typing in the full path: /sbin/sysdef If this works, you can alias the command: alias sysdef="/sbin/sysdef" You should then be able to run it by just typing the name. If that works, you could consider adding that alias command to your ~/.bashrc (for bash -- research the proper location for other shells), for your convenience. ShawnMilo |
|
||||
|
Quote:
Under the normal user account I did the 'which sysdef' and I got the output 'no sysdef in /usr/bin /usr/openwin/bin /usr/ucb'. So I ran the same command as root and I got '/usr/bin/sysdef'. From my understanding of that it's is showing me that the sysdef files are located in the /usr/bin. What I attempted to do next was to create a soft link between the sysdef in the /usr/bin to the /usr/bin/local; I found out that the sysdef files are not in there. The command I used for that is "ln -s /usr/sbin/sysdef /usr/local/bin/sysdef". Had a look in the /usr/bin/local and the sysdef was there. Tried to run the sysdef command as the normal user and still got nothing 'command not found'. Have I attempted to go about this the wrong way. My knowledge of Unix is very rudimentary so if someone could point out where I am going wrong I would be more than grateful. Rgds, Everett |
|
||||
|
Quote:
Thanks for helping out. |
|
||||
|
Quote:
I don't think it's a good idea to arbitrarily add symlinks into system directories, such as /usr/local/bin, but I could be wrong. ShawnMilo |
![]() |
| Bookmarks |
| Tags |
| solaris |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|