rm /etc/profile: line 33: id: command not found
![](http://jazz.net/_images/myphoto/ac37cd0f817302f1db6c1f7282660abb.jpg)
Why can't run simple command like pwd and rm, but unzip works?
134 08/28/12 03:09PM EXEC Locale set to 'C' 135 08/28/12 03:09PM PTY allocated pseudo-tty pipe 255 08/28/12 03:09PM EXEC Performing variable expansion on command line 256 08/28/12 03:09PM EXEC spawning shell [/bin/bash] 257 08/28/12 03:09PM SCRIPT pwd 258 08/28/12 03:09PM SCRIPT rm -Rf bldforge_AOMS_DEV 259 08/28/12 03:09PM SCRIPT rm AOM_Dev_Full_Build_r1.3.11_TxCX_120828135108_B494.zip 260 08/28/12 03:09PM SCRIPT unzip -o AOM_Dev_Full_Build_r1.3.11_TxCX_120828150815_B494.zip 261 08/28/12 03:09PM EXEC start [/home/c999752@rfksappd02] 262 08/28/12 03:09PM EXEC /etc/profile: line 33: id: command not found 263 08/28/12 03:09PM EXEC /etc/bashrc: line 8: id: command not found 264 08/28/12 03:09PM EXEC /etc/bashrc: line 8: id: command not found 265 08/28/12 03:09PM EXEC 266 08/28/12 03:09PM EXEC /home/c999752 267 08/28/12 03:09PM EXEC -bash: line 4: rm: command not found 268 08/28/12 03:09PM EXEC -bash: line 5: rm: command not found 269 08/28/12 03:09PM EXEC Archive: AOM_Dev_Full_Build_r1.3.11_TxCX_120828150815_B494.zip 270 08/28/12 03:09PM EXEC inflating: bldforge_AOMS_DEV/WebSphere_AVOB/AOMS_FDN/Foundation/extensions/global/entities/Extensions.xml
Accepted answer
![](http://jazz.net/_images/myphoto/ac37cd0f817302f1db6c1f7282660abb.jpg)
Something is missing from your PATH env var. You should see PATH listed in the ENV section of your step log. usually it would look similar to this: /usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
Depending on your system, unzip, id, and rm may all be in different directories from mine. I would suggest logging in from the command-line, find out where these commands are located (try "which rm" for instance to locate the rm command) and then look at the PATH variable to make sure all of the directories you need are in there.
4 other answers
![](http://jazz.net/_images/myphoto/ac37cd0f817302f1db6c1f7282660abb.jpg)
It's still not working. I set the PATH to the right one, as you can see I tried from unix command and it works.
252 08/28/12 04:35PM ENV LANG=C 253 08/28/12 04:35PM ENV PATH=/usr/bin:/etc:/usr/sbin:/usr/ucb::/usr/bin/X11:/sbin:/opt/rational/clearcase/bin:/opt/rational/clearcase/etc/utils:.254 08/28/12 04:35PM ENV REMOTE_HOST=::ffff:10.1.131.23
255 08/28/12 04:35PM EXEC Performing variable expansion on command line 257 08/28/12 04:35PM EXEC spawning shell [/bin/bash] 258 08/28/12 04:35PM SCRIPT pwd 259 08/28/12 04:35PM SCRIPT rm -Rf bldforge_AOMS_DEV 260 08/28/12 04:35PM SCRIPT rm AOM_Dev_Full_Build_RETAGGING_16.zip 261 08/28/12 04:35PM SCRIPT unzip -o AOM_Dev_Full_Build_HPPC_BUILD_TAG.zip 262 08/28/12 04:35PM EXEC start [/home/c999752@rfksappd02.hbc.com] 263 08/28/12 04:35PM EXEC /home/c999752 264 08/28/12 04:35PM EXEC -bash: line 4: rm: command not found 265 08/28/12 04:35PM EXEC -bash: line 5: rm: command not found
[c999752@rfksappd02 ~]$ set PATH=/usr/bin:/etc:/usr/sbin:/usr/ucb::/usr/bin/X11:/sbin:/opt/rational/clearcase/bin:/opt/rational/clearcase/etc/utils:. [c999752@rfksappd02 ~]$ rm rm: missing operand Try `rm --help' for more information. [c999752@rfksappd02 ~]$ echo $PATH /usr/local/bin:/bin:/usr/bin:/home/c999752/bin:/usr/bin:/etc:/usr/sbin:/usr/ucb::/usr/bin/X11:/sbin:/opt/rational/clearcase/bin:/opt/rational/clearcase/etc/utils:.:/home/c999752/bin:/usr/bin:/etc:/usr/sbin:/usr/ucb::/usr/bin/X11:/sbin:/opt/r [c999752@rfksappd02 ~]$ rm rm: missing operand Try `rm --help' for more information.
![](http://jazz.net/_images/myphoto/ac37cd0f817302f1db6c1f7282660abb.jpg)
note that the :: and the . in your path are functionally equivalent. It is also not a good security best practice to have . or a null (::) in your path as someone could put a malicious program named "ls" in a directory and if you were in that directory when you executed "ls" it could compromise your account.
Comments
![](http://jazz.net/_images/myphoto/ac37cd0f817302f1db6c1f7282660abb.jpg)
I tried the following: .tset env "PATH=$PATH", but the result is something like "PATH=Z:;PATH", which looks the PATH set in the project environment (Z:\;%PATH%) for the windows environment.
What I want is actually the current $path in the unix agent. How can I do that?
![](http://jazz.net/_images/myphoto/66c442639fabf5f2ff9eec295b4c0a51.jpg)
set an env var named PATH in an environment group. apply that group to your unix server. in that group, set the value to be "PATH=/usr/bin:/etc:/usr/sbin:/usr/ucb::/usr/bin/X11:/sbin:/opt/rational/clearcase/bin:/opt/rational/clearcase/etc/utils:."
you do not need to use .tset
alternatively you could set the path in your step using a shell command export PATH=/usr/local/bin:/usr/bin:/bin rm filename
![](http://jazz.net/_images/myphoto/ac37cd0f817302f1db6c1f7282660abb.jpg)
set an env var named PATH in an environment group. apply that group to your unix server. in that group, set the value to be "PATH=/usr/bin:/etc:/usr/sbin:/usr/ucb::/usr/bin/X11:/sbin:/opt/rational/clearcase/bin:/opt/rational/clearcase/etc/utils:."
<br><br>
you do not need to use .tset
alternatively you could set the path in your step using a shell command
export PATH=/usr/local/bin:/usr/bin:/bin
rm filename