Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have an Ubuntu Server 12.04 running on a Dell D620 Machine called "homeserver".

Everytime i log into the SSH with the user homeserver (yes same name as machine) the terminal shows root@homeserver.

i looks like i even have admin rights.

The last thing I've done was trying to install Roundcube on the machine.

What is the possible reason for this problem?

edit:

I log in from my windows machine with putty [email protected] <-- IP of the machine

root@homeserver:~# id
uid=0(root) gid=0(root) Gruppen=0(root),4(adm),24(cdrom),27(sudo),30(dip),46(plugdev),111(sambashare),113(lpadmin)

root@homeserver:~# who
homeserver pts/0        2012-07-22 13:30 (dennis-ibm-laptop.fritz.box)

edit2:

root@homeserver:~# getent passwd homeserver
homeserver:x:0:0:homeserver,,,:/home/homeserver:/bin/bash
share|improve this question
    
Show the exact ssh command you use, and what does id say after logging in? –  geirha Jul 22 '12 at 11:45

1 Answer 1

up vote 0 down vote accepted

The id command says you are root, but the who command says you're logged in as user homeserver. It sounds like both users, homeserver and root, has uid 0.

getent passwd homeserver
share|improve this answer
    
@DennisSchma, my suspision was confirmed. The third colon-separated field is the uid, which says 0 for your homeserver user. Thus homeserver and root is the exact same user. How did you create the user? –  geirha Jul 22 '12 at 12:06
    
this is the way I installed the server and before it logged in as homeserver... is there a way to change the UID? –  Dennis Schma Jul 22 '12 at 12:09
    
@DennisSchma homeserver is the initial user you created during installation? That's odd, it should've given the initial user uid 1000. –  geirha Jul 22 '12 at 12:12
    
yes homeserver is the user I created at installation. is there a way to change the UID of a user? –  Dennis Schma Jul 22 '12 at 12:15
    
@DennisSchma, yes, you can edit /etc/passwd and /etc/group, and change uid and gid of the homeserver user and group, but you must also change ownership of the homedir and any files that user should own. –  geirha Jul 22 '12 at 12:21

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.