Topic "Set effective/primary group of login?"

Author Message
oblique77
[View user's profile]

Joined: 2012-10-25
Posts: 1
Hi,

Compliments on a fantastic piece of software that's made a huge difference to a lot of people.

Apologies if I've missed this elsewhere, but is it possible to set the effective group of the user when logging in (or after?) - the equivalent of "newgrp" in a shell? Have tried to do this as a custom command from winscp, but it forces a loss of connection from the server.

I know this is a little unusual - I am using a server (server A) that is trying to access files from another server (B) via NFS which files protected by ACLs. It is the ACL that allows access to the files, rather than the standard user/group permissions. On a local shell on server A, the newgrp command is apparently needed to access the files.

many thanks for any advice!
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24538
Location: Prague, Czechia
What protocol are you using?
This FAQ (though rather unrelated) might give you some idea how to alter the environment on remote server:
http://winscp.net/eng/docs/faq_su
_________________
Martin Prikryl
Tomas

Guest


This issue happens, because newgrp opens a new shell.

The only way around this which we found, was to save public key with newgrp command prefix in .ssh/authorized_keys2:
cat >> .ssh/authorized_keys2 <<_EOF
command="newgrp <group>" ssh-dss AAAA ...
_EOF
and use key for authentication. This way, winscp opens directly the new shell. But of course, you need to have one key per group.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24538
Location: Prague, Czechia
As suggested above, you can add newgrp <group> to SFTP server option (for SFTP) or Shell (for SCP).
_________________
Martin Prikryl
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License