Results 1 to 6 of 6

Thread: How to execute a command without entering path on CentOS 5.5?

  1. #1
    Join Date
    Apr 2011
    Posts
    62

    How to execute a command without entering path on CentOS 5.5?

    Well I have installed CentOS 5.5 on the computer of mine. I am looking to have execute the command without providing path while running the same. for eg if I am looking execute the # setsebool then it will prompt with following error message on the screen. ‘bash: setsebool: command not found’. I have to enter /usr/sbin/setsebool in order to make thing working. Any help on this particular matter would be highly appreciated. Thanks a lot in advance.

  2. #2
    Join Date
    Nov 2009
    Posts
    792

    Re: How to execute a command without entering path on CentOS 5.5?

    Well looking at the in the situation you need to run all the command as root of the computer. Root is a special user account which is being designed for the system administration on the Linux based computer. It is used to separate the normal user account from the administrative account. You can use the following command format to be a root of the computer of yours.
    Code:
    su - <user>
    here user is the user name of yours.

  3. #3
    Join Date
    Apr 2009
    Posts
    994

    Re: How to execute a command without entering path on CentOS 5.5?

    Many time I have seen that users who have executed the SU command on the computer you will get command not found error on the terminal. Why because all the commands for the regular users are located on the /usr/local/bin location where as when you are using the su command on the terminal it would retain the original path on the computer of yours. so you should consider the point while doing the above mentioned thing.

  4. #4
    Join Date
    Nov 2009
    Posts
    865

    Re: How to execute a command without entering path on CentOS 5.5?

    If you are not looking to be root each and every time on the computer then you should use the administrative task on the system then you should run sudo command on the terminal. You should install the sudo package on the computer you should configure the same by simply running the same using visudo as a root of the computer of yours. by default it is running on /etc/sudoers and it is not recommend to do the same manually.

  5. #5
    Join Date
    Apr 2009
    Posts
    1,107

    Re: How to execute a command without entering path on CentOS 5.5?

    I think you need to use the Graphical helper in order to get the requirement of yours. you should use KDE into ‘Run Command...’ option which is available into KDE menu in order to run the command or applications. The people who are not familiar with the command line can use the above mentioned thing to meet the requirement of yours. so you should use the same and let me know about the results in this particular situation.

  6. #6
    Join Date
    Nov 2009
    Posts
    824

    Re: How to execute a command without entering path on CentOS 5.5?

    Well you can use the consolehelper to get the requirement of yours. when it is started it simply checks the configuration of the PAM for any specific application. It means it is authenticating the users by using the all the installed PAM modules. It prompts for the password. We can also use hardware or smart card or something like that. but in the simple situation one should preferred to become a root as a password.

Similar Threads

  1. Execute GUI commands from the command line
    By dogonthehorizon in forum Windows Software
    Replies: 1
    Last Post: 21-07-2011, 03:50 AM
  2. Windows phone 7: How to execute the MVVM command?
    By Mishraji in forum Windows Software
    Replies: 3
    Last Post: 27-10-2010, 09:38 PM
  3. Execute dos command in java
    By Gillian Anderson in forum Software Development
    Replies: 4
    Last Post: 22-03-2010, 01:21 PM
  4. How to execute a command in a remote computer?
    By austin26 in forum Technology & Internet
    Replies: 3
    Last Post: 12-12-2009, 08:34 PM
  5. Replies: 1
    Last Post: 08-11-2008, 05:22 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,727,101,023.52371 seconds with 17 queries