usermod says account doesn't exist but adduser says it does
up vote
0
down vote
favorite
I run the command
usermod -a -G dialout amashreghi
but I get amashreghi doesn't exists, however, when I try to add the user using adduser
adduser amashreghi
It says that amashreghi already exists. What's going on?!
adduser accounts
add a comment |
up vote
0
down vote
favorite
I run the command
usermod -a -G dialout amashreghi
but I get amashreghi doesn't exists, however, when I try to add the user using adduser
adduser amashreghi
It says that amashreghi already exists. What's going on?!
adduser accounts
Doesamashreghi
have a password?
– George Udosen
Oct 11 '17 at 20:15
Yes, I am sudo user but not root. I have tried usermod with sudo as well though.
– A. Mashreghi
Oct 11 '17 at 20:37
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I run the command
usermod -a -G dialout amashreghi
but I get amashreghi doesn't exists, however, when I try to add the user using adduser
adduser amashreghi
It says that amashreghi already exists. What's going on?!
adduser accounts
I run the command
usermod -a -G dialout amashreghi
but I get amashreghi doesn't exists, however, when I try to add the user using adduser
adduser amashreghi
It says that amashreghi already exists. What's going on?!
adduser accounts
adduser accounts
edited Oct 11 '17 at 20:14
George Udosen
19k94266
19k94266
asked Oct 11 '17 at 20:11
A. Mashreghi
1012
1012
Doesamashreghi
have a password?
– George Udosen
Oct 11 '17 at 20:15
Yes, I am sudo user but not root. I have tried usermod with sudo as well though.
– A. Mashreghi
Oct 11 '17 at 20:37
add a comment |
Doesamashreghi
have a password?
– George Udosen
Oct 11 '17 at 20:15
Yes, I am sudo user but not root. I have tried usermod with sudo as well though.
– A. Mashreghi
Oct 11 '17 at 20:37
Does
amashreghi
have a password?– George Udosen
Oct 11 '17 at 20:15
Does
amashreghi
have a password?– George Udosen
Oct 11 '17 at 20:15
Yes, I am sudo user but not root. I have tried usermod with sudo as well though.
– A. Mashreghi
Oct 11 '17 at 20:37
Yes, I am sudo user but not root. I have tried usermod with sudo as well though.
– A. Mashreghi
Oct 11 '17 at 20:37
add a comment |
3 Answers
3
active
oldest
votes
up vote
0
down vote
Give this a try. (I'm assuming that you're ready to delete everything associated with this user and start over, don't run these if you're not.)
userdel -r amashreghi
grep amashreghi /etc/passwd
If that second command returns anything, run:
sudo -H gedit /etc/passwd
Remove the line that begins with amashreghi
, and save the file. Try adding the user again now.
add a comment |
up vote
0
down vote
To edit /etc/group
directly use vigr
From man vigr
NAME
vipw, vigr - edit the password, group, shadow-password or shadow-group file
SYNOPSIS
vipw [options]
vigr [options]
DESCRIPTION
The vipw and vigr commands edits the files /etc/passwd and /etc/group, respectively. With the -s flag,
they will edit the shadow versions of those files, /etc/shadow and /etc/gshadow, respectively. The
programs will set the appropriate locks to prevent file corruption. When looking for an editor, the
programs will first try the environment variable $VISUAL, then the environment variable $EDITOR, and
finally the default editor, vi(1).
Hence, you can edit the /etc/group
file with
sudo vigr
The format of group entries can be found in man.
From man group
:
NAME
group - user group file
DESCRIPTION
The /etc/group file is a text file that defines the groups on the system. There is one entry per line,
with the following format:
group_name:password:GID:user_list
The fields are as follows:
group_name the name of the group.
password the (encrypted) group password. If this field is empty, no password is needed.
GID the numeric group ID.
user_list a list of the usernames that are members of this group, separated by commas.
FILES
/etc/group
add a comment |
up vote
-1
down vote
Just do this:
sudo vim /etc/group
and add your name to the desired group, like:
somegroup:x:25:yourusername
1
Vim is not recommended to edit the group file: see unix.stackexchange.com/a/79177/262708
– abu_bua
Nov 28 at 14:28
add a comment |
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
Give this a try. (I'm assuming that you're ready to delete everything associated with this user and start over, don't run these if you're not.)
userdel -r amashreghi
grep amashreghi /etc/passwd
If that second command returns anything, run:
sudo -H gedit /etc/passwd
Remove the line that begins with amashreghi
, and save the file. Try adding the user again now.
add a comment |
up vote
0
down vote
Give this a try. (I'm assuming that you're ready to delete everything associated with this user and start over, don't run these if you're not.)
userdel -r amashreghi
grep amashreghi /etc/passwd
If that second command returns anything, run:
sudo -H gedit /etc/passwd
Remove the line that begins with amashreghi
, and save the file. Try adding the user again now.
add a comment |
up vote
0
down vote
up vote
0
down vote
Give this a try. (I'm assuming that you're ready to delete everything associated with this user and start over, don't run these if you're not.)
userdel -r amashreghi
grep amashreghi /etc/passwd
If that second command returns anything, run:
sudo -H gedit /etc/passwd
Remove the line that begins with amashreghi
, and save the file. Try adding the user again now.
Give this a try. (I'm assuming that you're ready to delete everything associated with this user and start over, don't run these if you're not.)
userdel -r amashreghi
grep amashreghi /etc/passwd
If that second command returns anything, run:
sudo -H gedit /etc/passwd
Remove the line that begins with amashreghi
, and save the file. Try adding the user again now.
edited Oct 11 '17 at 23:23
Eliah Kagan
81k20226364
81k20226364
answered Oct 11 '17 at 23:21
P3TR1CH0R
1
1
add a comment |
add a comment |
up vote
0
down vote
To edit /etc/group
directly use vigr
From man vigr
NAME
vipw, vigr - edit the password, group, shadow-password or shadow-group file
SYNOPSIS
vipw [options]
vigr [options]
DESCRIPTION
The vipw and vigr commands edits the files /etc/passwd and /etc/group, respectively. With the -s flag,
they will edit the shadow versions of those files, /etc/shadow and /etc/gshadow, respectively. The
programs will set the appropriate locks to prevent file corruption. When looking for an editor, the
programs will first try the environment variable $VISUAL, then the environment variable $EDITOR, and
finally the default editor, vi(1).
Hence, you can edit the /etc/group
file with
sudo vigr
The format of group entries can be found in man.
From man group
:
NAME
group - user group file
DESCRIPTION
The /etc/group file is a text file that defines the groups on the system. There is one entry per line,
with the following format:
group_name:password:GID:user_list
The fields are as follows:
group_name the name of the group.
password the (encrypted) group password. If this field is empty, no password is needed.
GID the numeric group ID.
user_list a list of the usernames that are members of this group, separated by commas.
FILES
/etc/group
add a comment |
up vote
0
down vote
To edit /etc/group
directly use vigr
From man vigr
NAME
vipw, vigr - edit the password, group, shadow-password or shadow-group file
SYNOPSIS
vipw [options]
vigr [options]
DESCRIPTION
The vipw and vigr commands edits the files /etc/passwd and /etc/group, respectively. With the -s flag,
they will edit the shadow versions of those files, /etc/shadow and /etc/gshadow, respectively. The
programs will set the appropriate locks to prevent file corruption. When looking for an editor, the
programs will first try the environment variable $VISUAL, then the environment variable $EDITOR, and
finally the default editor, vi(1).
Hence, you can edit the /etc/group
file with
sudo vigr
The format of group entries can be found in man.
From man group
:
NAME
group - user group file
DESCRIPTION
The /etc/group file is a text file that defines the groups on the system. There is one entry per line,
with the following format:
group_name:password:GID:user_list
The fields are as follows:
group_name the name of the group.
password the (encrypted) group password. If this field is empty, no password is needed.
GID the numeric group ID.
user_list a list of the usernames that are members of this group, separated by commas.
FILES
/etc/group
add a comment |
up vote
0
down vote
up vote
0
down vote
To edit /etc/group
directly use vigr
From man vigr
NAME
vipw, vigr - edit the password, group, shadow-password or shadow-group file
SYNOPSIS
vipw [options]
vigr [options]
DESCRIPTION
The vipw and vigr commands edits the files /etc/passwd and /etc/group, respectively. With the -s flag,
they will edit the shadow versions of those files, /etc/shadow and /etc/gshadow, respectively. The
programs will set the appropriate locks to prevent file corruption. When looking for an editor, the
programs will first try the environment variable $VISUAL, then the environment variable $EDITOR, and
finally the default editor, vi(1).
Hence, you can edit the /etc/group
file with
sudo vigr
The format of group entries can be found in man.
From man group
:
NAME
group - user group file
DESCRIPTION
The /etc/group file is a text file that defines the groups on the system. There is one entry per line,
with the following format:
group_name:password:GID:user_list
The fields are as follows:
group_name the name of the group.
password the (encrypted) group password. If this field is empty, no password is needed.
GID the numeric group ID.
user_list a list of the usernames that are members of this group, separated by commas.
FILES
/etc/group
To edit /etc/group
directly use vigr
From man vigr
NAME
vipw, vigr - edit the password, group, shadow-password or shadow-group file
SYNOPSIS
vipw [options]
vigr [options]
DESCRIPTION
The vipw and vigr commands edits the files /etc/passwd and /etc/group, respectively. With the -s flag,
they will edit the shadow versions of those files, /etc/shadow and /etc/gshadow, respectively. The
programs will set the appropriate locks to prevent file corruption. When looking for an editor, the
programs will first try the environment variable $VISUAL, then the environment variable $EDITOR, and
finally the default editor, vi(1).
Hence, you can edit the /etc/group
file with
sudo vigr
The format of group entries can be found in man.
From man group
:
NAME
group - user group file
DESCRIPTION
The /etc/group file is a text file that defines the groups on the system. There is one entry per line,
with the following format:
group_name:password:GID:user_list
The fields are as follows:
group_name the name of the group.
password the (encrypted) group password. If this field is empty, no password is needed.
GID the numeric group ID.
user_list a list of the usernames that are members of this group, separated by commas.
FILES
/etc/group
edited Nov 28 at 14:48
answered Nov 28 at 14:34
abu_bua
3,15081023
3,15081023
add a comment |
add a comment |
up vote
-1
down vote
Just do this:
sudo vim /etc/group
and add your name to the desired group, like:
somegroup:x:25:yourusername
1
Vim is not recommended to edit the group file: see unix.stackexchange.com/a/79177/262708
– abu_bua
Nov 28 at 14:28
add a comment |
up vote
-1
down vote
Just do this:
sudo vim /etc/group
and add your name to the desired group, like:
somegroup:x:25:yourusername
1
Vim is not recommended to edit the group file: see unix.stackexchange.com/a/79177/262708
– abu_bua
Nov 28 at 14:28
add a comment |
up vote
-1
down vote
up vote
-1
down vote
Just do this:
sudo vim /etc/group
and add your name to the desired group, like:
somegroup:x:25:yourusername
Just do this:
sudo vim /etc/group
and add your name to the desired group, like:
somegroup:x:25:yourusername
answered Nov 28 at 13:28
David Joos
11
11
1
Vim is not recommended to edit the group file: see unix.stackexchange.com/a/79177/262708
– abu_bua
Nov 28 at 14:28
add a comment |
1
Vim is not recommended to edit the group file: see unix.stackexchange.com/a/79177/262708
– abu_bua
Nov 28 at 14:28
1
1
Vim is not recommended to edit the group file: see unix.stackexchange.com/a/79177/262708
– abu_bua
Nov 28 at 14:28
Vim is not recommended to edit the group file: see unix.stackexchange.com/a/79177/262708
– abu_bua
Nov 28 at 14:28
add a comment |
Thanks for contributing an answer to Ask Ubuntu!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f964040%2fusermod-says-account-doesnt-exist-but-adduser-says-it-does%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Does
amashreghi
have a password?– George Udosen
Oct 11 '17 at 20:15
Yes, I am sudo user but not root. I have tried usermod with sudo as well though.
– A. Mashreghi
Oct 11 '17 at 20:37