Questions tagged [switch-user]

44 questions
0
votes
2 answers

How can I pass a password from a file to the "su" command?

How can I pass password to su command in shell script from another text file. password.txt is like password=tryme shell script need to be ran by user gucq1 shell script is like #!/bin/bash cd /pstools/85419/jre/bin java -Xms1024M -Xmx1024M…
SHaFqaT M
  • 1
  • 2
0
votes
1 answer

InSpec + TestKitchen: How to execute command on behalf of specific user?

My Chef cookbook installs Ruby locally for specific user. I want to write an InSpec test that checks if specific version of Ruby is available and if gems are installed without documentation. So obviously I somehow need to run commands on behalf of…
Kirill
  • 6,762
  • 4
  • 51
  • 81
0
votes
2 answers

Symfony FOS user bundle - Switch User failed: "Username "*" does not exist."

It really is what the headline states - I can't figure out why user switching isn't working. In my security.yml I have: firewalls: # disables authentication for assets and the profiler, adapt it according to your needs dev: pattern:…
user3440145
  • 793
  • 10
  • 34
0
votes
0 answers

how many users logged on the computer

Suppose there are multiples users currently logged on on Windows. Say, user1 logs on, then switch user and user2 logs on, (without making user1 log off). I want to create a script that runs in the background all the time that does a full restart…
0
votes
0 answers

No changes after successful user switch on spring security

I enabled user switch with the following changes to Config.groovy: grails.plugin.springsecurity.useSwitchUserFilter = true grails.plugin.springsecurity.controllerAnnotations.staticRules = [ '/j_spring_security_switch_user':['ROLE_SWITCH_USER',…
Adolfo
  • 798
  • 1
  • 7
  • 15
0
votes
1 answer

fabric -- cant run commands after user is switched

I have been recently introduced to fabric and trying to approach the following: access remote host su root perform a command, for example change password for multiple users done! Please note that I cant use sudo, nor connect directly to the remote…
Zee
  • 172
  • 1
  • 5
  • 12
0
votes
1 answer

Using Sudo in Windows SFTP to switch user?

I am trying to upload files on my server using the PuTTY SFTP command shell. My teammates have been using the Mac and Linux is our server, so they have predefined commands. I am working on Windows and need to do the following (these are ssh commands…
Incredible
  • 3,495
  • 8
  • 49
  • 77
0
votes
1 answer

How to get Notification when "switch User" happen in window7

I am building a window application in C# which will notify me when any switch user happen. Right now m using "SessionSwitch" event to get the notification. private void startLisning() { Microsoft.Win32.SystemEvents.SessionSwitch +=new…
Subo
  • 445
  • 1
  • 5
  • 9
0
votes
1 answer

Symfony2 impersonate listener with parameters injection

i'm currently working on a custom logic impersonate listenener. i overrided the Symfony\Component\Security\Http\Firewall\SwitchUserListener because i would like to perform call to some entities repositories ( not User entity ) before authorize the…
Charles-Antoine Fournel
  • 1,713
  • 1
  • 25
  • 37
0
votes
1 answer

android switch user programmatically

I'm trying to create an app that runs the switch-user command. is there any API for switch-user command ? is it possible to switch users from android application (assuming I've multiple users set)?
Sharas
  • 1,985
  • 3
  • 20
  • 43
0
votes
2 answers

Cocoa - Force User To Switch?

I am building a mac application, that at a certain time, needs to switch the currently logged in user to a different, preset one. Essentially a modified login window. Is there a way to do this using cocoa? -- Ari Edit: Is there a way to not require…
Ari Porad
  • 2,834
  • 3
  • 33
  • 51
0
votes
2 answers

Switch user and output variable contents

I am writing a bash script and want to switch to another user, cd into a directory specified by MYDIR in the users bash_profile and list the contents. Currently I have: read username su - app${username} -c ls $MYDIR The output is nothing, my first…
AdamW
  • 1,061
  • 10
  • 14
-1
votes
1 answer

one-liner to become another user and run a command as that user

In my local machine, I would like to become another user (let's say currently I am user_c) and then to run a command as that user, specifically I would like to become user_o and run whoami. I usually do this in two lines like so: sudo -i -u -user_o …
Tms91
  • 3,456
  • 6
  • 40
  • 74
-1
votes
2 answers

Windows 7 - Black screen at logoff / switch user

Since July 5, some of our Windows 7 Enterprise machines started showing black screen and becoming unresponsive at user log off / switching users. No changes have been made in our environment; nothing in common between these production computers as…
FQ63
  • 1
1 2
3