The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

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:
    0
    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:
    38
    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:
    0
    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:
    0
    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:
    38
    - 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,475
    Likes Received:
    20
    Trophy Points:
    38
    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.
     
  7. SarcNBit

    SarcNBit Well-Known Member

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

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

Share This Page