Koozali.org: home of the SME Server

Obsolete Releases => SME Server 7.x => Topic started by: toarn on April 24, 2009, 10:06:54 PM

Title: [SOLVED] problem with remote ssh access
Post by: toarn 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!
Title: Re: problem with remote ssh access
Post by: chris burnat on April 24, 2009, 10:54:31 PM
are you logged as root - not as a user?
Title: Re: problem with remote ssh access
Post by: toarn on April 24, 2009, 10:57:52 PM
Yes, logged in as root.
Title: Re: problem with remote ssh access
Post by: chris burnat 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
Title: Re: problem with remote ssh access
Post by: toarn 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.
Title: Re: problem with remote ssh access
Post by: chris burnat 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.

Title: Re: problem with remote ssh access
Post by: toarn 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.
Title: [RESOLVED] Re: problem with remote ssh access
Post by: chris burnat 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