Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

APF issue / disable root access

Discussion in 'General Discussion' started by chadi, Jul 31, 2004.

  1. chadi

    chadi BANNED

    Joined:
    Apr 20, 2004
    Messages:
    415
    Likes Received:
    0
    Trophy Points:
    166
    I disabled root login just fine but now I tried to block an ip address in apf

    apf - d "ip" and got a command not found. I've done this many times but now it won't work in root (login via user then su root).

    Why would it not work?
     
  2. SarcNBit

    SarcNBit Well-Known Member

    Joined:
    Oct 14, 2003
    Messages:
    1,010
    Likes Received:
    3
    Trophy Points:
    168
    Did you really put a space between the "-" and the "d"? There should not be a space there.

    Did you "su -" or just "su"?
     
  3. chadi

    chadi BANNED

    Joined:
    Apr 20, 2004
    Messages:
    415
    Likes Received:
    0
    Trophy Points:
    166
    No I did not put a space, that was my typo here.

    its actually
    apf -d "ip'

    I get a bash command not found error message
     
  4. chadi

    chadi BANNED

    Joined:
    Apr 20, 2004
    Messages:
    415
    Likes Received:
    0
    Trophy Points:
    166
    i did
    su root

    strange because i just tried su - and it works

    what is the difference anyway?
     
  5. SarcNBit

    SarcNBit Well-Known Member

    Joined:
    Oct 14, 2003
    Messages:
    1,010
    Likes Received:
    3
    Trophy Points:
    168
    - passes along the environment variables for the user you are su'ing to.

    If you 'su - JOHNDOE' , your session will behave as if you had logged on as JOHNDOE. If you 'su -", then it is assumed that you are trying to 'su - root'.

    You're welcome.
     
  6. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,470
    Likes Received:
    21
    Trophy Points:
    463
    Location:
    Go on, have a guess
    Go, on you had to bite your lip ;)

    I'm finding it handy to tell people to use su -l as it seems to make more sense to them than su - which seems less intuitive so far as "standard" command structure is concerned.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  7. SarcNBit

    SarcNBit Well-Known Member

    Joined:
    Oct 14, 2003
    Messages:
    1,010
    Likes Received:
    3
    Trophy Points:
    168
    Was it that obvious? :D

    I was trying very hard not to muck up another thread. :)
     
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice