说明 以下操作都是基于SQLServer登陆验证方式登陆.而且操作员都是 sa. 一.添加登陆账号 use master go ' 第一个(xu)是登陆名,第二个(123456)是登陆密码. 执行语句,就可以在安全性\登陆名里看到新创建的账号了. 二.创建数据库用户 use StudentManageDB go exec sp_grantdbaccess 'xu', 'xuUser01' 第一个(xu)是登陆名,第二个(xuUser01)是指定数据库用户. 执行语句,就可以在指定数据库安全性\登
[root@MSJTVL-MJSP-A01 sm01]# vim /etc/rc.d/rc.local #!/bin/sh # # This script will be executed *after* all the other init scripts. # You can put your own initialization stuff in here if you don't # want to do the full Sys V style init stuff. touch /v
1.在/etc/profile中添加如下代码: #history USER_IP=`>/dev/null| awk '{print $NF}'|sed -e 's/[()]//g'` HISTDIR=/usr/share/.history if [ -z $USER_IP ] then USER_IP=`hostname` fi if [ ! -d $HISTDIR ] then mkdir -p $HISTDIR $HISTDIR fi if [ ! -d $HISTDIR/${LOGNAME
功能说明:用root用户执行一个脚本,脚本里需要切换到普通用户DT去执行其他命令,其中就用到了EOF,用法如下: #!/bin/bash su - DT<<EOF cd apache-tomcat-7.0.54/bin sh startup.sh EOF 当时以为su - DT就跟在交换界面执行一样会把环境也切换过去,所以在分界符EOF里用的是相对路径,结果一运行就报错: -bash: line 8: cd: apache-tomcat-7.0.54/bin: 没有那个文件或目录 然后就做了个