Search Results

Search found 77 results on 4 pages for 'whoami'.

Page 2/4 | < Previous Page | 1 2 3 4  | Next Page >

  • Does such beast exist

    - by ggonsalv
    I know of whoami.exe. Is there a version called whereami.exe The output should be able to tell me if I am on a LAN, wireless or VPN. the machines would be running Windows Xp or better.

    Read the article

  • Default file permissions for php user www-data

    - by John Isaacks
    I have a php installed on my ubuntu machine. The web root is /var/www I set the permissions for this folder like so: sudo chown -R ftpuser:www-data /var/www ftpuser is the user I set up so I can ftp to /var/www from another machine on the network. www-data is the user php uses. I double checked using whoami from php. Whenever I ftp upload a new file to the machine the group has no permissions to the file. So when I try to access it in my browser via machine-name/new-file.php I am told permission denied and I have to go and chmod the new file. I am wondering if there is a way I can default the www-data user/group to have access permissions to new files so I don't have to keep chmod every new file?

    Read the article

  • Allow any arguments for a given command with sudo

    - by Mark L
    I have the following sudo config entry which I added via sudo visudo: mark ALL = NOPASSWD: /usr/bin/lxc-ls* I can run lxc-ls with my user fine but I can't append any parameters without it demanding I prefix the command with sudo. $ whoami mark $ lxc-ls test-container $ lxc-ls --fancy lxc-ls: error: You must be root to access advanced container properties. Try running: sudo /usr/bin/lxc-ls Any idea how I can edit via sudo visudo to allow for any argument after the command? I don't want to prefix the command with sudo as I'm using a python library to execute the command and it's being funny about sudo prefixes.

    Read the article

  • SSH login with expect(1). How to exit expect and remain in SSH?

    - by Koroviev
    So I wanted to automate my SSH logins. The host I'm with doesn't allow key authentication on this server, so I had to be more inventive. I don't know much about shell scripting, but some research showed me the command 'expect' and some scripts using it for exactly this purpose. I set up a script and ran it, it worked perfectly to login. #!/usr/bin/env expect -f set password "my_password" match_max 1000 spawn ssh -p 2222 "my_username"@11.22.11.22 expect "*?assword:*" send -- "$password\r" send -- "\r" expect eof Initially, it runs as it should. Last login: Wed May 12 21:07:52 on ttys002 esther:~ user$ expect expect-test.exp spawn ssh -p 2222 [email protected] [email protected]'s password: Last login: Wed May 12 15:44:43 2010 from 20.10.20.10 -jailshell-3.2$ But that's where the success ends. Commands do not work, but hitting enter just makes a new line. Arrow keys and other non-alphanumeric keys produce symbols like '^[[C', '^[[A', '^[OQ' etc.[1] No other prompt appears except the two initially created by the expect script. Any ignored commands will be executed by my local shell once expect times out. An example: -jailshell-3.2$ whoami ls pwd hostname (...time passes, expect times out...) esther:~ user$ whoami user esther:~ ciaran$ ls Books Documents Movies Public Code Downloads Music Sites Desktop Library Pictures expect-test.exp esther:~ ciaran$ pwd /Users/ciaran esther:~ ciaran$ hostname esther.local As I said, I have no shell scripting experience, but I think it's being caused because I'm still "inside of" expect, but not "inside of" SSH. Is there any way to terminate expect once I've logged in, and have it hand over the SSH session to me? I've tried commands like 'close' and 'exit', after " send -- "\r" ". Yeah, they do what I want and expect dies, but it vindictively takes the SSH session down with it, leaving me back where I started. What I really need is for expect to do its job and terminate, leaving the SSH session back in my hands as if I did it manually. All help is appreciated, thanks. [1] I know there's a name for this, but I don't know what it is. And this is one of those frightening things which can't be googled, because the punctuation characters are ignored. As a side question, what's the story here?

    Read the article

  • Linux/PHP Question

    - by user369770
    I'm a pretty Huge n00b when it comes to Linux exec ('whoami', $output, $return); echo $return; // Outputs 127 Which means the command is not executing. I can get it to execute when I root into the server. Any help would be greatly appreciated!

    Read the article

  • how do I resolve "user isn't assigned to any management roles" error in Exchange 2010 EMC?

    - by TheoJones
    Newly installed Exchange 2010 box (technically, a partially installed box, as this error is preventing me from completing the install). When I launch EMC or the Management Powershell, I get this error: VERBOSE: Connecting to myserver.mydomain.internal [myserver.mydomain.internal] Processing data from remote server failed with the following error message: The user "mydomain\administrator" isn't assigned to any management roles. For more information, see the about_Remote_Troubleshooting Help topic. Failed to connect to any Exchange Server in the current site. Thing is.. The logged in administrator account (confirmed using 'whoami') is a member of the following groups: Administrators Delegated Setup Discovery Management Domain Admins Domain Users Enterprise Admins Exchange Organization Administrators GPO Creator Owners Organization Management Schema Admins Server Management Any ideas? how can I get past this?

    Read the article

  • How do I set a postgresql password in pgpass.conf for the Administrator account on Windows Server 2008?

    - by brad
    I have a pgpass.conf file that works well for my default user. It is in C:/Users/myuser/AppData/Roaming/postgresql/pgpass.conf. It reads like so; localhost:5432:*:postgres:password1 I have a process that runs under the Administrator account. When I run whoami under this process I get nt authority/system. I want to be able to access the database from this process but it gets stuck because it needs a password. I have tried putting the above pgpass.conf into C:/Users/Administrator/AppData/postgresql/pgpass.conf and C:/Users/Administrator/AppData/Roaming/postgresql/pgpass.conf but it does not work. Is this the correct place for this file? Am I even able to do this as the Administrator. Unfortunately I cannot change the user that this process runs under.

    Read the article

  • Where does Rundesk execute local tasks from

    - by Leon Stafford
    I'm trying to interact with the nodejs Azure sdk from a CentOS installation of Rundeck. If I try from the "run" adhoc virtual shell, I am able to after running azure account import <mykey> and can then also execute other Azure commands inside of jobs if I set them as Rundeck node tasks and not selecting "dispatch to nodes" in the job settings. Trying to run the Azure sdk commands as commands to be dispatched to the node (local) fails with the error: localhost1-NodeDispatch-localexec 04:53:04 /usr/bin/env: node: No such file or directory 04:53:04 Failed: NonZeroResultCode: Result code was 127 I am not able to "jumpstart" the same environment by running azure account import <mykey> I am assuming this is a permissions/environmental issue, though not sure how to fix it. UPDATE: Executing whoami from the same job returns rundeck, so I assume I will need to either modify that to execute tasks as my system user or grant permissions to get the rundeck user into the node environment the Azure sdk is running in?

    Read the article

  • unable to re-attach screen session on freebsd

    - by Michael
    I have a screen session that I am unable to re-attach to. I have tried kill -CHLD 6859, with zero success. Is there anything else that I can try to get this session re-attached q4# screen -ls No Sockets found in /tmp/screens/S-root. q4# ls -la /tmp/screens/S-root/ total 8 drwx------ 2 root wheel 512 May 26 12:52 . drwxr-xr-x 4 root wheel 512 Feb 26 2013 .. prwx------ 1 root wheel 0 May 26 10:14 6859.pts-0.q4 q4# ps uax 6859 USER PID %CPU %MEM VSZ RSS TT STAT STARTED TIME COMMAND root 6859 0.0 1.2 84732 50444 ?? Ss 2Jan13 34:06.71 screen -h 9999 q4# screen -r There is no screen to be resumed. q4# whoami root q4#

    Read the article

  • Duplicate pseudo terminals in linux

    - by bobtheowl2
    On a redhat box [ Red Hat Enterprise Linux AS release 4 (Nahant Update 3) ] Frequently we notice two people being assigned to the same pseudo terminal. For example: $who am i user1 pts/4 Dec 29 08:38 (localhost:13.0) user2 pts/4 Dec 29 09:43 (199.xxx.xxx.xxx) $who -m user1 pts/4 Dec 29 08:38 (localhost:13.0) user2 pts/4 Dec 29 09:43 (199.xxx.xxx.xxx) $whoami user2 This causes problems in a script because "who am i" returns two rows. I know there are differences between the two commands, and obviously we can change the script to fix the problem. But it still bothers me that two users are being returned with the same terminal. We suspect it may be related to dead sessions. Can anyone explain why two (non-unique) pts number are being assigned and/or how that can be prevented in the future?

    Read the article

  • Can't install Parallels Tools on Debian 7.2.0

    - by jfm429
    (Parallels Desktop 9, latest version) As per instructions, I switch to root: $ su - root $ whoami root $ echo $EUID 0 and then execute the installer: $ cd /media/cdrom0 $ ./install and I get this error: sudo: unable to execute ./install: Permission denied What? I'm root! What's with this? I double check to make sure the execute bit is set: $ ls -lA | grep install$ -r-xr-xr-x 1 root root 17284 Oct 25 09:22 install Yep. People online are saying that you need to drag the install script to the terminal after typing sudo. So I do that, and this command is what's formed: $ sudo '/media/cdrom0/install' sudo: unable to execute /media/cdrom0/install: Permission denied What's the solution here?

    Read the article

  • centos: su silently fails

    - by matteo
    On a CentOS server where I'm logged via SSH as root, I do: su otherusername where 'otherusername' is the user name of another user, which exists. It does nothing. After that, I'm still root. whoami returns root, any file I create belongs to root, that is, su just doesn't su. However it does not give any error message. If I try to su with an invalid user name it does give an error message. What am I missing??

    Read the article

  • PHP shell_exec times out, but not when executed manually

    - by Breck Fresen
    I have a Windows 2008 server with PHP and msys installed. I also have a simple php script that calls shell_exec and tars a few files. When I run the script on my development machine (Windows 7), it works fine. However, when I run it on the Windows 2k8 server, it times out. When I copy and paste exactly what's being run on the cmd line and run it, it executes w/out error in less than a second. One more important detail: when I shell_exec 'dir' or 'netstat', the script runs without any problems. When I shell_exec 'ls' it hangs. When I run ls on the command line, it returns immediately. Other details that might be useful: The Windows 2k8 server is a VPS hosted by Rackspace. I did vanilla installs of Apache, PHP, and msys, but I haven't installed anything else. When I run whoami, I see the php script is executing as the user "nt authority\system".

    Read the article

  • After updating debian lenny, ps stops recognising my users

    - by William Coates
    Since upgrading my debian lenny box with apt-get, ps seems to be behaving strangely, and also if i run top i see under the user column the ids, not the names. whoami => foo ps -U foo => ERROR: User name does not exist. I get this output when I run "strace -e trace=open ps -U foo 2&1 | less", seems just this /usr/lib/libnss_compat.so.2 doesnt exist: open("/etc/mtab", O_RDONLY) = 3 open("/usr/lib/locale/locale-archive", O_RDONLY|O_LARGEFILE) = 3 open("/proc/self/stat", O_RDONLY) = 3 open("/proc/uptime", O_RDONLY) = 3 open("/etc/nsswitch.conf", O_RDONLY) = 4 open("/etc/ld.so.cache", O_RDONLY) = 4 open("/lib/libnss_compat.so.2", O_RDONLY)=4 open("/usr/lib/libnss_compat.so.2", O_RDONLY)=-1 ENOENT (No such file or directory) open("/proc/self/stat", O_RDONLY)= 4

    Read the article

  • Fabric and cygwin don't work with windows UNC paths

    - by tcoopman
    I have some strange problems with fabric deployment to Windows Server 2008r2. The thing I try to accomplish is to copy some files to a shared folder with a fabric script (this script does a lot of other things too, but only this step gives me problems). This is the problem: When I try to access a UNC(Universal Naming convention) path I always get access denied kind of answers if I run the script in fabric. When I run the command in an ssh prompt (same user) it works fine. Examples: cmd: robocopy f:/.... //share result: in ssh this works fine, in fabric I get "Logon failure: the user has not been granted the requested logon type aat this computer." cmd: cd //share result: in ssh this works fine, in fabric I get "//share: Not a directory" Further information: uname -a and whoami return exact the same thing in fabric and ssh. I also tried things like mount, net use, but these commands all have kind of the same problem.

    Read the article

  • How can I setup a group writeable directory?

    - by meder
    $ whoami meder $ cd /var/www $ sudo mkdir html $ sudo groupadd web $ sudo usermod -a -G web meder $ sudo usermod -a -G web medertest $ sudo chown meder:web html $ sudo chmod -R g+rwx html The problem is, anytime I create a new file in /var/www/html even though the group is set to web, it is only writeable by the original user. I was given the advice of setting the umask to be 002 because the default is what causes the problems. But I would have to do this for all users in that group, and as far as I know it would be tedious having all of them modify ~/.bashrc to have umask 002. Even if I can do it myself with a shell command for all of those users, it still seems too tedious. Can anyone offer any advice on having a group writeable directory?

    Read the article

  • Can't create a file even if rights allow and I've relogged in

    - by stiv
    I try to create file in folder with group write access, user tomcat7 is in group. Why isn't it workin? skr@konrad~/data/asu$ sudo -u tomcat7 sh $ whoami tomcat7 $ echo > /home/skr/data/asu/g.gz.index sh: 2: cannot create /home/skr/data/asu/g.gz.index: Permission denied $ ls -la /home/skr/data/asu/ total 18708 drwxrwxr-x 2 skr skr 4096 Sep 29 08:38 . drwxrwxr-x 85 skr skr 4096 Jul 30 00:42 .. $ grep ^skr /etc/group skr:x:1002:tomcat7:mail Tried to logout, but it doesn't help. Any ideas?

    Read the article

  • New users' directories owned by root

    - by dotancohen
    On a CentOS server running Plesk, new users are added for each new domain. The users' home directories are in /var/www/vhosts/. New users' home directories are owned by root, and need to have an admin with root access come in and chown them: dotan@sh2:~$ echo $HOME /var/www/vhosts/someDomain.com dotan@sh2:~$ pwd /var/www/vhosts/someDomain.com dotan@sh2:~$ touch testFile touch: cannot touch `testFile': Permission denied dotan@sh2:~$ ls -la ../ | grep someDomain drwxr-xr-x 13 root root 4096 2012-08-07 19:47 someDomain.com dotan@sh2:~$ whoami dotan dotan@sh2:~$ chown dotan /var/www/vhosts/someDomain.com chown: changing ownership of `/var/www/vhosts/someDomain.com': Operation not permitted dotan@sh2:~$ Why might the new users' directories be owned by root, and how might we fix this? Thanks.

    Read the article

  • Exploring other windows 8 machine's root

    - by moswald
    (Note, this is without a domain.) I used to be able to type start \\other_machine\c$ in PowerShell and explorer would pop up with a login dialog. Then I'd type other_machine\moswald and my password (the account is a local admin, of course) and I'm in. Now both machines have Windows 8 installed, and this no longer works (the dialog re-prompts with an "Access is denied" displayed). I've verified (through whoami) that the user is named other_machine\moswald, and I'm positive I'm typing the correct password. So what gives? (edited to include specific result)

    Read the article

  • Allow user to SUDO a script without password.

    - by John Isaacks
    I have a php script with this: <?php #echo exec('whoami'); $output = shell_exec('bash /usr/local/svn/bash_repo/make-live'); echo "$output"; ?> The make-live script contains this: #!/bin/bash cd /var/www-cake sudo svn checkout file:///usr/local/svn/bash_repo/repo/ echo "Head revision has been pushed to live server" So the PHP user who is www-data needs to have nopasswd for that script. I am told I need to add: www-data ALL=NOPASSWD: /usr/local/svn/bash_repo/make-live To sudoers to allow this. First I run sudo visudo but I have no experience with vi so I try to open it in gedit with export EDITOR=gedit && sudo -E visudo which then just opens a sudoers.tmp file which is empty. I add the line and save it. But it doesn't do save. So I just try sudo visudo and I add the line right beneath this part: # User privilege specification root ALL=(ALL) ALL www-data ALL=NOPASSWD: /usr/local/svn/bash_repo/make-live I closed out sudoers and reopened to verify that it has saved. I even restart apache. I run the php file and it still doesn't work. What am I missing?

    Read the article

  • Connect to remote server

    - by [email protected]
    Hi All, I'm new to perl. And I have used following code from one forum to connect to one of the server. but throwing error messages [root@Cus]# cat tt.pl #!/usr/bin/perl use Net::Telnet; $telnet = new Net::Telnet ( Timeout=>2, Errmode=>'die'); $telnet->open('10.0.0.28'); $telnet->waitfor('/login:/'); $telnet->print('administrator'); $telnet->waitfor('/Password:/'); $telnet->print('test'); $telnet->waitfor('/switch8-12>/'); $telnet->print('whoamI'); $output=$telnet->waitfor('/switch8-12>/'); print $output; But throwing following error messages. [root@Cus]# ./tt.pl ./tt.pl: line 3: use: command not found ./tt.pl: line 4: syntax error near unexpected token `(' ./tt.pl: line 4: `$telnet = new Net::Telnet ( Timeout=>2, Errmode=>'die');'

    Read the article

  • Why do I get 'use: command not found' when I run my Perl script?

    - by [email protected]
    I'm new to Perl. And I have used following code from one forum to connect to one of the server. but throwing error messages [root@Cus]# cat tt.pl #!/usr/bin/perl use Net::Telnet; $telnet = new Net::Telnet ( Timeout=>2, Errmode=>'die'); $telnet->open('10.0.0.28'); $telnet->waitfor('/login:/'); $telnet->print('administrator'); $telnet->waitfor('/Password:/'); $telnet->print('test'); $telnet->waitfor('/switch8-12>/'); $telnet->print('whoamI'); $output=$telnet->waitfor('/switch8-12>/'); print $output; But throwing following error messages. [root@Cus]# ./tt.pl ./tt.pl: line 3: use: command not found ./tt.pl: line 4: syntax error near unexpected token `(' ./tt.pl: line 4: `$telnet = new Net::Telnet ( Timeout=>2, Errmode=>'die');'

    Read the article

  • How can I use my own connection class with a strongly typed dataset?

    - by Maslow
    I have designed a class with sqlClient.SqlCommand wrappers to implement such functionality as automatic retries on timeout, Async (thread safety), error logging, and some sql server functions like WhoAmI. I've used some strongly typed datasets mainly for display purposes only, but I'd like to have the same database functionality that I use with my class. Is there an interface I can implement or a way to hook my command/connection class into the dataset at design or runtime? Or would I need to somehow write a wrapper for the dataset to implement these types of functions? if this is the only option could it be made generic to wrap anything that inherits from dataset?

    Read the article

  • php/ssh2 script does not display the stdout to $stream

    - by kamal
    The following php script works for simple linux commands, like ps -ef , but when i use ./dstat -t -a , it seems to hang and i dont get the prompt back on my local machine. Kep in mind that all commands are executed over ssh on a remote host: <?php $target = time() . '_' . 'txt'; if($ssh = ssh2_connect('10.1.0.174', 22)) { if(ssh2_auth_password($ssh, 'root', 'kmoon77')) { //$stream = ssh2_exec($ssh, 'whoami'); $sCommand = 'dstat -a'; //$sCommand = 'ps -ef'; $stream = ssh2_exec($ssh, $sCommand); //$stream = ssh2_exec($ssh, 'pwd'); stream_set_blocking($stream, true); $data = ''; while($buffer = fread($stream, 4096)) { $data .= $buffer; } //fclose($stream); echo $data; // user } } ?>

    Read the article

< Previous Page | 1 2 3 4  | Next Page >