Results 1 to 10 of 13
Hi ,
I created a new user
/etc/passwd
joe :1005:0::/home/joe:/bin/bash
also added him to the group root
vi /etc/group
root :0:root,joe
when i do
su joe
gives me
ERROR: NO ...
- 04-22-2010 #1Just Joined!
- Join Date
- Jun 2008
- Posts
- 58
adduser problem
Hi ,
I created a new user
/etc/passwd
also added him to the group rootjoe
:1005:0::/home/joe:/bin/bash
vi /etc/group
root
:0:root,joe
when i do
su joe
gives me
Strange, any ideas??ERROR: NO LOGNAME
- 04-22-2010 #2Just Joined!
- Join Date
- Apr 2010
- Posts
- 5
try to avtivate the user with passwd beforehand.
- 04-22-2010 #3
No, it's not requires for a user account to have a password.
I'm confused why you aren't using the useradd or adduser command to create the user?
Also, you shouldn't edit /etc/passwd or /etc/group with a plain text editor, but use vipw and vigr instead.
But here's help on manually creating a user.
Creating a user
Also, why are you giving your user the root group id and adding them to the root group?
- 04-22-2010 #4Just Joined!
- Join Date
- Jun 2008
- Posts
- 58
I did try adduser first.....I'm confused why you aren't using the useradd or adduser command to create the user?
I was planning to give this username to my technician to carry out some maintenance work. it needs root privileges to carry out some of these tasks, at the same time I'm wary of giving him the root password.Also, why are you giving your user the root group id and adding them to the root group?
i should have mentioned this earlier. this is a busybox kernel, no vipw appletAlso, you shouldn't edit /etc/passwd or /etc/group with a plain text editor, but use vipw and vigr instead.
- 04-22-2010 #5And what happened? You can find the busybox man page here, including its adduser command instructions.I did try adduser first.....
Better to use sudo to set him up with specific privileges.I was planning to give this username to my technician to carry out some maintenance work. it needs root privileges to carry out some of these tasks, at the same time I'm wary of giving him the root password.
- 04-22-2010 #6Just Joined!
- Join Date
- Jun 2008
- Posts
- 58
-busybox adduser creates the user, but its like 'useless' as in I'm not able to login using that user, or su to that user. I see the user in /etc/passwd and do stuff like change password etc....but it doesnt help....
-already went through the manual,
sudo doesn't work on busybox....
-this is a custom build on busybox, maybe thats what preventing me from getting what i required from adduser.
Any other suggestions?
- 04-23-2010 #7Just Joined!
- Join Date
- Jul 2008
- Posts
- 81
You might as well give Joe the root password since if you put him in group 0 he can do everything that root can do. Including changing the root password so you don't know it any more.
- 04-23-2010 #8
Putting user in root group does not give it root privileges in any distro I'm familiar with, but I'm no busybox expert. It would mostly just give some additional file perms, some of which might be useable to compromise root. In Fedora, Ubuntu, et al, it definitely does not permit running passwd with a username (e.g. root) specified. It also thus probably would not accomplish what you're trying to do.
I do create additional uid 0 users for temporary root privileges quite frequently on RedHat boxes, for circumstances like yours. I normally create with adduser then edit /etc/passwd and change uid to 0 (and chown -R root:root the home directory).
What happens when you add with adduser and then try to log in or su? The same error as with your hand-rolled entry?
The thing that looks odd about the entry you posted
joe:1005:0::/home/joe:/bin/bash
is that there's no password field, unless that grimace face is supposed to represent a colon. It should look like
joe::1005:0::/home/joe:/bin/bash
or
joe
:1005:0::/home/joe:/bin/bash
or some such. The uid is not the second field, it's the third. So you'd be off by one on all fields after the username.
Is the colon actually there, and the grimace face just an artifact of posting?
EDIT: I can see that in my reply the colon-x that I put in after Joe in the second "should look like" line shows up as a grimace face when displayed. So, I guess your entry is probably correct, fieldwise.Last edited by Mudgen; 04-23-2010 at 01:06 AM. Reason: AHA moment
- 04-23-2010 #9
What happens if you "passwd -u joe" as root? Also, does /etc/shadow exist? Is joe in there?
- 04-23-2010 #10forum.guy
- Join Date
- May 2004
- Location
- arch linux
- Posts
- 18,097
oz
→ new members/users: read this first | new member faq
→ no private messages requesting computer support - post them on the forums!
→ please use the "report post" button to alert our forum admins to problematic posts rather than responding to them yourself.


Reply With Quote
