我收到了这个错误
stty: standard input: Invalid argument
当我运行一个包含以下命令的shell脚本时:
sudo su - <name>
示例:
cat file.txt | while read line
do
echo $line
sudo su - $line
exit
done
文件file.txt - 仅包含用户名。
我有管理员权限,所以这不是问题。
答案 0 :(得分:0)
如果您正在向用户执行sudo,则必须返回到运行该脚本的当前用户。
答案 1 :(得分:0)
您只需提供// ALWAYS ALWAYS ALWAYS sanitize your input. Use prepared statements to
// build safe queries (see first comment under this answer). This example
// of using msqli_escape_string is NOT considered "secure", but is used in
// this context to highlight the importance of sanitization.
$product_categories1 = msqli_escape_string($product_categories1);
if ($var == 'condition') {
$condition = "agentid IS NOT NULL";
}
else {
$condition = "agentid IS NULL";
}
$sql = "SELECT * FROM suppliers
WHERE product_categories LIKE '%$product_categories1%'
AND $condition";
的用户名:
sudo