最近Google一直上不去,
站内搜索也就没法用了……估计这个问题曾经可能有人遇到并解决过……
我使用下面这个命令,将我的添加到了一个组里面……
sudo usermod -G grop xxx
然后重新启动……发现sudo不好用了!
xxx is not in the sudoers file. This incident will be reported.
通过恢复模式,终于看到了亲切的#,可是使用usermod -aG sudo xxx
然后它说:
cannot lock /etc/passwd
有人说删除掉.pwd.lock文件就好了,
可是我rm .pwd.lock
说这个文件只读,不能删除……
使用chmod还不好使……
现在我应该怎么让我的账户可以使用sudo呢?
谢谢大家!
悲剧了,SUDO不好用了,怎么办?
版面规则
我们都知道新人的确很菜,也喜欢抱怨,并且带有浓厚的Windows习惯,但既然在这里询问,我们就应该有责任帮助他们解决问题,而不是直接泼冷水、简单的否定或发表对解决问题没有任何帮助的帖子。乐于分享,以人为本,这正是Ubuntu的精神所在。
我们都知道新人的确很菜,也喜欢抱怨,并且带有浓厚的Windows习惯,但既然在这里询问,我们就应该有责任帮助他们解决问题,而不是直接泼冷水、简单的否定或发表对解决问题没有任何帮助的帖子。乐于分享,以人为本,这正是Ubuntu的精神所在。
- 8E117
- 帖子: 110
- 注册时间: 2014-01-30 12:08
- 系统: xubuntu 14.04
悲剧了,SUDO不好用了,怎么办?
使用Ubuntu单系统的菜鸟一枚:
Ubuntu入门中……
SuperCollider入门中……
Java入门中……
各种入门中……
菜鸟上路,请多多关照。
Ubuntu入门中……
SuperCollider入门中……
Java入门中……
各种入门中……
菜鸟上路,请多多关照。
- 8E117
- 帖子: 110
- 注册时间: 2014-01-30 12:08
- 系统: xubuntu 14.04
Re: 悲剧了,SUDO不好用了,怎么办?
使用Ubuntu单系统的菜鸟一枚:
Ubuntu入门中……
SuperCollider入门中……
Java入门中……
各种入门中……
菜鸟上路,请多多关照。
Ubuntu入门中……
SuperCollider入门中……
Java入门中……
各种入门中……
菜鸟上路,请多多关照。
-
- 帖子: 217
- 注册时间: 2009-10-06 21:41
- 系统: ARCH
Re: 悲剧了,SUDO不好用了,怎么办?
usermod -G 是修改用户组,添加用户到组用adduser user group
-
- 论坛版主
- 帖子: 18279
- 注册时间: 2009-08-04 16:33
Re: 悲剧了,SUDO不好用了,怎么办?
sudo 不好用发现 sudo 不好用了!
沒有 sudo 就不會用 ubuntu 了
1. 新舊帳號sudo usermod -G group xxx
usermod 使用在 已經存在的帳號
useradd 使用在 新增加的帳號
2. 參數
-G supplementary group
-g primary group
3. 進一步參閱
http://www.go2linux.org/change-add-user-to-group
上次由 poloshiao 在 2014-06-09 11:39,总共编辑 1 次。
- 麦斯特
- 帖子: 1034
- 注册时间: 2005-03-28 0:00
- 系统: Gentoo x64
- 来自: ☸我佛山人
Re: 悲剧了,SUDO不好用了,怎么办?
添加用户到组,请用gpasswd。
Je ne suis pas d'accord avec ce que vous dites, mais je me battrai jusqu'à la mort pour que vous ayez le droit de le dire.
-
- 论坛版主
- 帖子: 18279
- 注册时间: 2009-08-04 16:33
Re: 悲剧了,SUDO不好用了,怎么办?
http://www.linuxquestions.org/questions ... ost5033168添加用户到组,请用gpasswd。
1. gpasswd -a user group
simply adds a user to the group
2. usermod -g user group
makes the group the users primary group
3. usermod -G user group
makes the group the users supplementary group
4. group 與 primary group 與 supplementary group 有何不同
http://linuxers.org/article/difference- ... oups-linux
The difference between Primary and Secondary groups in Linux
簡單說 關係到目錄及文件檔案的群組權限 需要設定其所屬的群組為 Primary 或 Secondary groups.