+ Post New Thread
Results 1 to 12 of 12
*nix Thread, SSH Problems in Technical; Got SSH working on my fedora 10 box and can login in as root fine When I try to login ...
  1. #1

    Gatt's Avatar
    Join Date
    Jan 2006
    Posts
    6,644
    Thank Post
    858
    Thanked 645 Times in 428 Posts
    Rep Power
    498

    Question SSH Problems

    Got SSH working on my fedora 10 box and can login in as root fine

    When I try to login as a standard user however I get this...

    Code:
    login as: user
    user@server password:
    Last login: Wed Feb 11 07:18:45 2009 from <<wks-name>>
    -bash: /etc/profile: Permission denied
    -bash-3.2$
    If i try to then run ssh-keygen i get

    Code:
    -bash-3.2$ ssh-keygen
    You don't exist, go away!
    -bash-3.2$
    When I am logged in as root my prompt is
    Code:
    [root@server ~]#
    Is this normal?

  2. #2

    mac_shinobi's Avatar
    Join Date
    Aug 2005
    Posts
    9,680
    Thank Post
    3,210
    Thanked 1,030 Times in 955 Posts
    Rep Power
    361
    im no linux guru but from the message it would seem you would need to alter the permissions on the /etc/profile whether thats the cause of the issue well thats another question.

  3. #3

    rob_f's Avatar
    Join Date
    May 2008
    Location
    Leeds
    Posts
    224
    Thank Post
    15
    Thanked 73 Times in 56 Posts
    Rep Power
    25
    Heard about this occasionally on fedora, can you check the permissions of /etc - as root do:

    # ls -al / | grep etc

    You should see something like:

    drwxr-xr-x 73 root root 4096 2009-02-10 11:15 etc

    But if it's

    drwxr----- 73 root root 4096 2009-02-10 11:15 etc

    Then the perms have been screwed up

  4. #4

    Gatt's Avatar
    Join Date
    Jan 2006
    Posts
    6,644
    Thank Post
    858
    Thanked 645 Times in 428 Posts
    Rep Power
    498
    Code:
     
    drwxr-xr-x+ 153 root    root      12288 2009-02-11 04:04 etc

  5. #5

    rob_f's Avatar
    Join Date
    May 2008
    Location
    Leeds
    Posts
    224
    Thank Post
    15
    Thanked 73 Times in 56 Posts
    Rep Power
    25
    Hmm looks good, how about:

    ls -al /etc/profile

  6. #6

    Gatt's Avatar
    Join Date
    Jan 2006
    Posts
    6,644
    Thank Post
    858
    Thanked 645 Times in 428 Posts
    Rep Power
    498
    Code:
    -rwxr-xr-x 1 root root 1138 2008-11-18 14:07 /etc/profile
    Also

    Code:
    # tail /var/log/secure
    Feb 11 09:06:59 mhs-srv-web01 sshd[1255]: Accepted password for cwilson from 10.4.24.7 port 49968 ssh2
    Feb 11 09:06:59 mhs-srv-web01 sshd[1255]: pam_unix(sshd:session): session opened for user cwilson by (uid=0)
    Feb 11 09:07:04 mhs-srv-web01 sshd[1255]: pam_unix(sshd:session): session closed for user cwilson
    Last edited by Gatt; 11th February 2009 at 09:10 AM.

  7. #7

    rob_f's Avatar
    Join Date
    May 2008
    Location
    Leeds
    Posts
    224
    Thank Post
    15
    Thanked 73 Times in 56 Posts
    Rep Power
    25
    Are you running SELinux? Type sestatus as root.

  8. #8

    Gatt's Avatar
    Join Date
    Jan 2006
    Posts
    6,644
    Thank Post
    858
    Thanked 645 Times in 428 Posts
    Rep Power
    498
    Nope - its disabled. really frustrating!

  9. #9


    Join Date
    Jan 2006
    Posts
    8,202
    Thank Post
    442
    Thanked 1,032 Times in 812 Posts
    Rep Power
    339
    the /etc has an extended attribute set ( the +). Long shot but check that there isn;t something explicitly denying access to /etc


    Code:
    getfacl /etc

  10. #10

    Gatt's Avatar
    Join Date
    Jan 2006
    Posts
    6,644
    Thank Post
    858
    Thanked 645 Times in 428 Posts
    Rep Power
    498
    interesting...
    Code:
    getfacl: Removing leading '/' from absolute path names
    # file: etc
    # owner: root
    # group: root
    user::rwx
    user:cwilson:rw-                #effective:r--
    group::r-x
    mask::r-x
    other::r-x

  11. #11


    Join Date
    Jan 2006
    Posts
    8,202
    Thank Post
    442
    Thanked 1,032 Times in 812 Posts
    Rep Power
    339
    try

    Code:
    setfacl -m user:cwilson:rwx
    (or maybe just rx to be safe)
    not sure how to do that recursively...

  12. Thanks to CyberNerd from:

    Gatt (11th February 2009)

  13. #12

    Gatt's Avatar
    Join Date
    Jan 2006
    Posts
    6,644
    Thank Post
    858
    Thanked 645 Times in 428 Posts
    Rep Power
    498
    Your a genius - it worked a treat !!

SHARE:
+ Post New Thread

Similar Threads

  1. Batch files for ssh/linux...
    By boomam in forum *nix
    Replies: 4
    Last Post: 13th November 2008, 11:25 AM
  2. one.com and other problems
    By ianaddisonuk in forum EduGeek Joomla 1.5 Package
    Replies: 4
    Last Post: 20th July 2008, 12:33 PM
  3. Reverse proxying SSH...
    By Joedetic in forum Wireless Networks
    Replies: 7
    Last Post: 6th August 2007, 11:56 AM
  4. SSH Client for Windows Mobile 5
    By Joedetic in forum Windows
    Replies: 5
    Last Post: 23rd June 2006, 01:16 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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