无标题文档
wdCP系统 (介绍,功能特性,运行环境,安装说明,演示,常见问题,使用教程) wdCDN系统 (介绍,功能特性,运行环境,安装说明,演示,常见问题,使用手册)
wdOS系统 (介绍,功能特性,运行环境,安装说明,演示,常见问题,使用教程) wdDNS系统 (介绍,功能特性,运行环境,安装说明,演示,常见问题,使用手册)
注册 发贴 提问 回复-必看必看 wddns免费智能 DNS 开通 本地或虚拟机使 用wdcp 一键包在mysql编 译时"卡住"
【300G高防】双线 无视攻击 wdcp官方技术支持/服务 阿里云8折优惠券 无敌云 腾讯云优惠中,现注册更有260代金额券赠送
返回列表 发帖
提问三步曲: 提问先看教程/FAQ索引(wdcp,wdcp_v3,一键包)及搜索,会让你更快解决问题
1 提供详细,如系统版本,wdcp版本,软件版本等及错误的详细信息,贴上论坛或截图发论坛
2 做过哪些操作或改动设置等

温馨提示:信息不详,很可能会没人理你!论坛有教程说明的,也可能没人理!因为,你懂的

[求助] 登录ssh,错误提示,怎么解决?

本帖最后由 喜欢眺望远处 于 2013-9-20 21:15 编辑





登录ssh,错误提示


: command not found
: command not found
: command not found
'bash: /etc/profile: line 11: syntax error near unexpected token `{
'bash: /etc/profile: line 11: `pathmunge(){

怎么解决?

  1. # /etc/profile

  2. # System wide environment and startup programs, for login setup
  3. # Functions and aliases go in /etc/bashrc

  4. # It's NOT a good idea to change this file unless you know what you
  5. # are doing. It's much better to create a custom.sh shell script in
  6. # /etc/profile.d/ to make custom changes to your environment, as this
  7. # will prevent the need for merging in future updates.

  8. pathmunge(){
  9.     case "{PATH}:" in
  10.         *:"$1":*)
  11.             ;;
  12.         *)
  13.             if [ "$2" = "after" ] ; then
  14.                 PATH=$PATH1
  15.             else
  16.                 PATH=$1PATH
  17.             fi
  18.     esac
  19. }


  20. if [ -x /usr/bin/id ]; then
  21.     if [ -z "$EUID" ]; then
  22.         # ksh workaround
  23.         EUID=`id -u`
  24.         UID=`id -ru`
  25.     fi
  26.     USER="`id -un`"
  27.     LOGNAME=$USER
  28.     MAIL="/var/spool/mail/$USER"
  29. fi

  30. # Path manipulation
  31. if [ "$EUID" = "0" ]; then
  32.     pathmunge /sbin
  33.     pathmunge /usr/sbin
  34.     pathmunge /usr/local/sbin
  35. else
  36.     pathmunge /usr/local/sbin after
  37.     pathmunge /usr/sbin after
  38.     pathmunge /sbin after
  39. fi

  40. HOSTNAME=`/bin/hostname 2>/dev/null`
  41. HISTSIZE=1000
  42. if [ "$HISTCONTROL" = "ignorespace" ] ; then
  43.     export HISTCONTROL=ignoreboth
  44. else
  45.     export HISTCONTROL=ignoredups
  46. fi

  47. export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE HISTCONTROL

  48. # By default, we want umask to get set. This sets it for login shell
  49. # Current threshold for system reserved uid/gids is 200
  50. # You could check uidgid reservation validity in
  51. # /usr/share/doc/setup-*/uidgid file
  52. if [ $UID -gt 199 ] && [ "`id -gn`" = "`id -un`" ]; then
  53.     umask 002
  54. else
  55.     umask 022
  56. fi

  57. for i in /etc/profile.d/*.sh ; do
  58.     if [ -r "$i" ]; then
  59.         if [ "${-#*i}" != "$-" ]; then
  60.             . "$i"
  61.         else
  62.             . "$i" >/dev/null 2>&1
  63.         fi
  64.     fi
  65. done

  66. unset i      
  67. unset pathmunge



  68. unset -f pathmungeunset MAILCHECK
复制代码

有改过
/etc/profile
这个文件?
看清提问三步曲及多看教程/FAQ索引(wdcp,v3,一键包,wdOS),益处多多.wdcp工具集 阿里云主机8折优惠码

TOP

unset -f pathmungeunset MAILCHECK
好像就在最后加过这个

但是去掉了 也没用

TOP

unset -f pathmungeunset MAILCHECK
好像就在最后加过这个

但是去掉了 也没用

TOP

根据提示一个个修复试试
看清提问三步曲及多看教程/FAQ索引(wdcp,v3,一键包,wdOS),益处多多.wdcp工具集 阿里云主机8折优惠码

TOP

我不懂linux,你能给我一个刚装好的 profile 文件内容?

TOP

我不懂linux,你能给我一个刚装好的 profile 文件内容?

TOP

我不懂linux,你能给我一个刚装好的 profile 文件内容?

TOP

返回列表