Koozali.org: home of the SME Server

[SOLVED] problem with remote ssh access

Offline toarn

  • 4
  • +0/-0
[SOLVED] problem with remote ssh access
« on: April 24, 2009, 10:06:54 PM »
So I am simply trying to allow a user to ssh in from the internet.  ssh from internet is enabled in admin gui, and I am able to have my user access the machine from the internet after following the guide here: http://wiki.contribs.org/SME_Server:Documentation:FAQ#Shell_Access the other day.  So I know ssh itself is set up correctly.

Problem is now when I go to add another user to the list of allowed users as described in the above wiki link with this command:

Code: [Select]
db accounts setprop <my_user> Shell /bin/bash
I get:

Code: [Select]
bash: db: command not found
and a quick
Code: [Select]
whereis db yields nothing.

I know there has to be something stupidly simple I am missing here.  Any hints at all are appreciated.  Thanks!

Offline chris burnat

  • *****
  • 1,135
  • +2/-0
    • http://www.burnat.com
Re: problem with remote ssh access
« Reply #1 on: April 24, 2009, 10:54:31 PM »
are you logged as root - not as a user?
- chris
If it does not work out of the box, please fill in a Bug Report @ Bugzilla (http://bugs.contribs.org)  - check: http://wiki.contribs.org/Bugzilla_Help .  Thanks.

Offline toarn

  • 4
  • +0/-0
Re: problem with remote ssh access
« Reply #2 on: April 24, 2009, 10:57:52 PM »
Yes, logged in as root.

Offline chris burnat

  • *****
  • 1,135
  • +2/-0
    • http://www.burnat.com
Re: problem with remote ssh access
« Reply #3 on: April 24, 2009, 11:22:28 PM »
Yes, logged in as root.
Issue the following command and paste the result please:
Code: [Select]
db accounts show admin
It will tell us whether you have correct access to the db database
- chris
If it does not work out of the box, please fill in a Bug Report @ Bugzilla (http://bugs.contribs.org)  - check: http://wiki.contribs.org/Bugzilla_Help .  Thanks.

Offline toarn

  • 4
  • +0/-0
Re: problem with remote ssh access
« Reply #4 on: April 25, 2009, 02:02:34 AM »
Code: [Select]
[root@sspfs ~]# db accounts show admin
bash: db: command not found

I swear, I did this just the other day following the same set of commands given on the wiki with no problem.  Really frustrating.

Offline chris burnat

  • *****
  • 1,135
  • +2/-0
    • http://www.burnat.com
Re: problem with remote ssh access
« Reply #5 on: April 25, 2009, 02:29:06 AM »
Code: [Select]
[root@sspfs ~]# db accounts show admin
bash: db: command not found

I swear, I did this just the other day following the same set of commands given on the wiki with no problem.  Really frustrating.

OK, do not panic, your issue requires investigation.  The best place for this to take place is at the Bugtracker.  So please fill a report at Bugzilla.  Go:

Code: [Select]
http://bugs.contribs.org/ 

And provide as much information as you can.  The people there will ask you some questions, the problem will most likely be identified and fixed if it is a bug. 
Thanks.

- chris
If it does not work out of the box, please fill in a Bug Report @ Bugzilla (http://bugs.contribs.org)  - check: http://wiki.contribs.org/Bugzilla_Help .  Thanks.

Offline toarn

  • 4
  • +0/-0
Re: problem with remote ssh access
« Reply #6 on: April 25, 2009, 02:46:30 AM »
Okay I figured out what is causing this behavior.  If I log in directly as root either through ssh or locally, I am able to run the db command , but not if I log in as my user then su to root.  But I can run it after I su to root by running it from its path /sbin/e-smith/db  I guess it was just a combination of /sbin/e-smith/ not being in my path after I su to root, and the whereis command not searching that directory by default.

Offline chris burnat

  • *****
  • 1,135
  • +2/-0
    • http://www.burnat.com
[RESOLVED] Re: problem with remote ssh access
« Reply #7 on: April 25, 2009, 04:03:16 AM »
If I log in directly as root either through ssh or locally, I am able to run the db command , but not if I log in as my user then su to root. 

You can maintain path and other things if you invoque su -

Code: [Select]
[chris@gateway0 ~]$ su
Password:
[root@gateway0 chris]# db accounts show admin
bash: db: command not found

BUT:

Code: [Select]
[chris@gateway0 ~]$ su -
Password:
[root@gateway0 ~]# db accounts show admin
admin=system
    EmailForward=forward
    EveryoneEmail=yes
    FirstName=Local
    ForwardAddress=
    LastName=Administrator
    Lockable=no
    PasswordSet=yes
    Removable=no
    Shell=/sbin/e-smith/console
    VPNClientAccess=no
 

- chris
If it does not work out of the box, please fill in a Bug Report @ Bugzilla (http://bugs.contribs.org)  - check: http://wiki.contribs.org/Bugzilla_Help .  Thanks.