Results 1 to 8 of 8

Thread: why does sudo only work sometimes?

  1. #1

    Default why does sudo only work sometimes?

    is it just me? I am wondering why half the time I try to use the sudo command it doesn't work I have to su/password which is a little bit annoying especially if I have to exit out of superuser or open up a second or third terminal to do another command that doesn't need to be superuser and then do another su/ password , when all I should have to do is use sudo then command
    here is an example sudo shutdown -r now and sudo modprobe for either of those commands I have to sign in as superuser

  2. #2

    Default Re: why does sudo only work sometimes?

    Quote Originally Posted by Shadowmeph View Post
    is it just me? I am wondering why half the time I try to use the sudo command it doesn't work I have to su/password which is a little bit annoying especially if I have to exit out of superuser or open up a second or third terminal to do another command that doesn't need to be superuser and then do another su/ password , when all I should have to do is use sudo then command
    here is an example sudo shutdown -r now and sudo modprobe for either of those commands I have to sign in as superuser
    You want to type

    sudo /sbin/shutdown ...

  3. #3
    ab@novell.com NNTP User

    Default Re: why does sudo only work sometimes?

    -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA1

    'sudo' can be configured to either require a password or not. If you do
    not want to enter a password every time then configure you /etc/sudoers
    file appropriately. The man page talks about this... I believe the
    parameter is NOPASSWD.

    Good luck.




    Shadowmeph wrote:
    > is it just me? I am wondering why half the time I try to use the sudo
    > command it doesn't work I have to su/password which is a little bit
    > annoying especially if I have to exit out of superuser or open up a
    > second or third terminal to do another command that doesn't need to be
    > superuser and then do another su/ password , when all I should have to
    > do is use sudo then command
    > here is an example sudo shutdown -r now and sudo modprobe for either of
    > those commands I have to sign in as superuser
    >
    >

    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.4.2 (GNU/Linux)
    Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

    iD8DBQFI0V5Z3s42bA80+9kRAjaeAJ9iy10X0esalO5YlfOjA1+P+vQaQQCfR5ZP
    l7v/zkGVb3XG1CPhUR0OoWw=
    =38rr
    -----END PGP SIGNATURE-----

  4. #4

    Default Re: why does sudo only work sometimes?

    isn't there a way just to use the sudo command instead of going to su all the time or is there a list of sudo commands I can find that work because I never used a command like this before sudo /sbin/shutdown doen't that just shutdown and not reboot?

  5. #5

    Default Re: why does sudo only work sometimes?

    You would do

    sudo /sbin/shutdown -r now

    When you use sudo in SUSE it uses your path by default, not root's path, which is why you need to specify the location of the shutdown command.

  6. #6
    ab@novell.com NNTP User

    Default Re: why does sudo only work sometimes?

    -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA1

    Wow... I completely misunderstood the question didn't I? Sheesh....

    Good luck.





    einheit47 wrote:
    > You would do
    >
    > sudo /sbin/shutdown -r now
    >
    > When you use sudo in SUSE it uses your path by default, not root's
    > path, which is why you need to specify the location of the shutdown
    > command.
    >
    >

    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.4.2 (GNU/Linux)
    Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

    iD8DBQFI0W+Y3s42bA80+9kRAjwqAJ0YgFutIEaqz/n18C+GesdNRZ+XnwCeMb1g
    4Ilc+M9dkjamSDiOjY8mzPo=
    =P0pw
    -----END PGP SIGNATURE-----

  7. #7

    Default Re: why does sudo only work sometimes?

    Quote Originally Posted by einheit47 View Post
    You would do

    sudo /sbin/shutdown -r now

    When you use sudo in SUSE it uses your path by default, not root's path, which is why you need to specify the location of the shutdown command.
    oh that explains allot lol

  8. #8

    Default Re: why does sudo only work sometimes?

    PATH HOWTO

    A fairly comprehensive explanation of paths in Linux.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •