Openwrt 串口多用户访问
来源:互联网 发布:深圳黑马程序员吧 编辑:程序博客网 时间:2024/04/30 03:52
参考:http://wiki.openwrt.org/doc/howto/secure.access
一、编译配置
1、make menuconfig
Administration --->
<*> sudo ... ...
Utilities --->
<*> shadow-groupadd ... ...
<*> shadow-useradd ... ...
<*> shadow-usermod ... ...
二、添加用户
useradd win
passwd win
mkdir -p /home/win
vim /etc/passwd
win:x:1000:1000::/home/win:/bin/ash
三、赋予root权限三种方法
①全面开放root权限
visudo
## Uncomment to allow any user to run sudo if they know the password
## of the user they are running the command as (root by default).
Defaults targetpw # Ask for the password of the target user
ALL ALL=(ALL) ALL # WARNING: only use this together with 'Defaults targetpw'
②给win加上root特权
visudo
##
## User privilege specification
##
root ALL=(ALL) ALL
win ALL=(ALL) ALL //添加此行
③创建sudo组
visudo
## Uncomment to allow members of group sudo to execute any command
%sudo ALL=(ALL) ALL
添加sudo 组
groupadd --system sudo
将win加入sudo 组
usermod -a -G sudo win
四、测试
可以使用sudo vi /etc/config/wireless这样的方式执行root权限,此时输入root密码。
一、编译配置
1、make menuconfig
Administration --->
<*> sudo ... ...
Utilities --->
<*> shadow-groupadd ... ...
<*> shadow-useradd ... ...
<*> shadow-usermod ... ...
二、添加用户
useradd win
passwd win
mkdir -p /home/win
vim /etc/passwd
win:x:1000:1000::/home/win:/bin/ash
三、赋予root权限三种方法
①全面开放root权限
visudo
## Uncomment to allow any user to run sudo if they know the password
## of the user they are running the command as (root by default).
Defaults targetpw # Ask for the password of the target user
ALL ALL=(ALL) ALL # WARNING: only use this together with 'Defaults targetpw'
②给win加上root特权
visudo
##
## User privilege specification
##
root ALL=(ALL) ALL
win ALL=(ALL) ALL //添加此行
③创建sudo组
visudo
## Uncomment to allow members of group sudo to execute any command
%sudo ALL=(ALL) ALL
添加sudo 组
groupadd --system sudo
将win加入sudo 组
usermod -a -G sudo win
四、测试
可以使用sudo vi /etc/config/wireless这样的方式执行root权限,此时输入root密码。
0 0
- Openwrt 串口多用户访问
- Openwrt 网页多用户访问
- 多用户模拟访问站点
- win2008 多用户远程访问
- openvpn 多用户访问
- OPENWRT的串口初试
- openwrt 下串口编程
- OpenWrt释放调试串口
- openwrt 串口操作
- openwrt的串口使用
- openwrt 串口 开发 注意事项
- Samba多用户访问[openSUSE 11.4]
- hadoop+hive多用户访问支持
- Mac 多用户远程访问模式
- 实现多用户远程桌面的访问
- openwrt调试串口转为普通通信串口
- openwrt (linux)串口通信
- OPENWRT串口收发测试详解
- MySQL问题解决:-bash:mysql:command not found
- shell脚本,用于自动构建xcode项目
- u-boot mkconfig文件分析
- 夏至未至,游太湖国家湿地公园
- CSS垂直居中实现方法大全
- Openwrt 串口多用户访问
- Java 中 modifer 'public' is reduntant for interface methods
- gcd补充说明
- 操作系统宏定义
- Android淘宝电影日期滚动栏的实现
- quartz CronExpression表达式
- C++ string 字符串 知识点 小结
- test
- 深圳华瑞三和集团有限公司携手泛微华南大区