Command "groups" failed (groups: No such file or directory)

Advertisement

jeyk
Guest

Command "groups" failed (groups: No such file or directory)

hello
I have a problem. When i want too connect with my server i see :
Command "groups"
failed with return code 2 and error message
groups: No such file or directory.
I dont know what it means.
Does anybody know how too solve this problem. I have serwer on linux freesco and package sshd with sftp-server.
Thank you.

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
27,253
Location:
Prague, Czechia

Re: Command "groups" failed (groups: No such file or directory)

On startup WinSCP tries to get list of groups to which user belongs by executing 'groups' command. This command is probably not supported by your server or the binary is not in path.

You may disable this feature by unchecking 'Lookup user groups' checkbox on Shell tab of login dialog.

For list of commands required by WinSCP see Shell requirements.
_________________
Martin Prikryl

Reply with quote

Jeyk
Guest

Re: Command "groups" failed (groups: No such file or directory)

Thank you.
When i open my log file i see something like this:
. Doing startup conversation with host (shell).
. Skipping host startup message (if any).
> echo "WinSCP: this is end-of-file:0"
< WinSCP: this is end-of-file:0
. Detecting variable containing return code of last command.
. Trying "$status".
> echo "$status" ; echo "WinSCP: this is end-of-file:0"
< WinSCP: this is end-of-file:0
. Trying "$?".
> echo "$?" ; echo "WinSCP: this is end-of-file:0"
< 0
< WinSCP: this is end-of-file:0
. Return code variable "$?" selected.
. Changing directory to "/mnt/home/djariusz".
> cd "/mnt/home/djariusz" ; echo "WinSCP: this is end-of-file:$?"
< WinSCP: this is end-of-file:0
. Getting current directory name.
> pwd ; echo "WinSCP: this is end-of-file:$?"

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
27,253
Location:
Prague, Czechia

Re: Command "groups" failed (groups: No such file or directory)

Jeyk wrote:

When i open my log file i see something like this:
...
OK, it looks fine. Does it mean that it works now?
_________________
Martin Prikryl

Reply with quote

redeye
Guest

able to login, but server is hanging now

Hi folks,

thanks for the tip on disabling the "Lookup user group" checkbox...that solves the first problem i was having.

the second problem i am having is that once i am logged in, i try to upload a file, and the server hangs and doesn't copy the file over. a window pops up sometimes to say that the server will abort in 15 seconds if i don't retry.

any ideas what may be causing the server to hang? OpenSSH is enabled, i have a linux box, and running Ensim Web Appliance to manage the hosting accounts.

Mahalo in advance,
redeye

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
27,253
Location:
Prague, Czechia

Re: able to login, but server is hanging now

  • Make sure that you're using BASH.
  • Make sure that scp binary is available on your server.

_________________
Martin Prikryl

Reply with quote

Alex Nevidomsky
Guest

Re: Command "groups" failed (groups: No such file or directory)

martin wrote:

On startup WinSCP tries to get list of groups to which user belongs by executing 'groups' command. This command is probably not supported by your server or the binary is not in path.

You may disable this feature by unchecking 'Lookup user groups' checkbox on Shell tab of login dialog.

For list of commands required by WinSCP see Shell requirements.

In my case it failed again immediately on "ls". The problem has been resolved by defining shell explicitly as "/bin/bash --login" ,which seems to force correct PATH environment.

Reply with quote

Vit Hauptman
Guest

Re: Command "groups" failed (groups: No such file or directory)

hello
I have the same problem, but I don't want to disable 'Lookup user groups' checkbox
I use SCPONLY with CHROOT (with chroot=/home/scpdemo/ ) and I have had copy file /usr/bin/groups to /home/scpdemo/usr/bin/groups, I have had also make /home/scpdemo/etc/group with one line scp::103: .
Can you help me to resolv the problem?

The winscp says: Command "groups" failed with invalid output "".
in log is: Looking up current user groups.
groups ; echo "WinSCP: this is end-of-file:$status"
WinSCP: this is end-of-file:-1

and in syslog is: Mar 18 09:32:41 servername [7427]: failed: /usr/bin/groups with error No such file or
directory(2) (username: scpdemo(2773), IP/port: x.x.x.x 1904 22)

Thank You

martin wrote:

On startup WinSCP tries to get list of groups to which user belongs by executing 'groups' command. This command is probably not supported by your server or the binary is not in path.

You may disable this feature by unchecking 'Lookup user groups' checkbox on Shell tab of login dialog.

For list of commands required by WinSCP see Shell requirements.

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
27,253
Location:
Prague, Czechia

Re: Command "groups" failed (groups: No such file or directory)

Do you have /home/scpdemo/usr/bin/ in path? And if you do, is it before /usr/bin/?
_________________
Martin Prikryl

Reply with quote

Vit Hauptman
Guest

Re: Command "groups" failed (groups: No such file or directory)

martin wrote:

Do you have /home/scpdemo/usr/bin/ in path? And if you do, is it before /usr/bin/?

I'm sorry, I don't understand, where in path?

(Muzeme mluvit i cesky)
hauptman@volny.cz

Reply with quote

Guest

Error looking up user groups, Version 4.5.2 (Build 624)

I appreciate the information in these posts; however, I am at a loss on how to 'uncheck "Lookup user groups" on Shell tab of Login dialog' using Version 4.5.2 (Build 624). The Shell tab link points to https://winscp.net/eng/docs/screenshots in which I do not see a Shell tab nor any reference to a "Lookup user groups" checkbox. When I check all of the preferences for WinSCP I still do not see a "Lookup user groups" checkbox in any of the preferences, nor do I see a way to disable this option in a script or on the command line.

I am using the /script option with WinSCP and it is not getting the files I am requesting. I am running WinSCP Version 4.5.2 (Build 624) on a Windows 2008 server.

FYI: The same script and WinSCP version ran successfully on Windows 2003 server.

Any help would be greatly appreciated.

Thank you!

Reply with quote

ZekeTheGeek
Joined:
Posts:
2

Error looking up user groups, Version 4.5.2 (Build 624)

I found the "Look up user groups" checkbox (you need to select "Advanced options"); however, the checkboxes in the "Other options" grouping are disabled.

Shell: Default
Return code variable: Autodetect

All other selections in "Directory listing" and "Other options" are disabled. How do I enable these other options?

Thanks!

Reply with quote

ZekeTheGeek
Joined:
Posts:
2

Error looking up user groups, Version 4.5.2 (Build 624)

I figured out how to enable the options, now my problem is getting WinSCP to pull the file I need. Since the "Look up user groups" checkbox is in the session, Do I need to use something other than a script?

Here is my script (sanitized):

option batch on
option confirm off
open scp://[USER]:{PWD]@[HOST]:[PORT]
cd [FOLDER]
option transfer automatic
get *.xml D:\FOLDER\FOLDER\FOLDER\FOLDER\FOLDER\
exit

I also tried

"D:\WinSCP\winscp.exe" /command "open" "[USER]:{PWD]@[HOST]:[PORT]" "get *.xml ""D:\FOLDER\FOLDER\FOLDER\FOLDER\FOLDER\"""

but this did not work.

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
27,253
Location:
Prague, Czechia

Re: Error looking up user groups, Version 4.5.2 (Build 624)

ZekeTheGeek wrote:

I figured out how to enable the options, now my problem is getting WinSCP to pull the file I need. Since the "Look up user groups" checkbox is in the session, Do I need to use something other than a script?
Note sure what you mean, though maybe this FAQ gives you an answer. If that does not help, come back.
_________________
Martin Prikryl

Reply with quote

RedKing
Guest

Set the defaults so that WinSCP does not lookup groups

I've found the best way to avoid looking up groups with a new connection is to set the default setting in WinSCPs registry entry.
This is particularly useful when using the command line version and specifying the /script switch.

Open regedit and navigate to;
HKEY_CURRENT_USER\Software\Martin Prikryl\WinSCP 2\Sessions\Default%20Settings

Create a new DWORD value entry called;
LookupUserGroups

Set the value of the LookupUserGroups entry to either 1 or 0;
1 => Will perform groups look up
0 => Will NOT perform groups look up

Hopefully this will help others with this issue

Rory

Reply with quote

Advertisement

You can post new topics in this forum