# Cannot get superuser



## artor19 (Feb 6, 2010)

I recently installed FreeBSD 7.2 on my desktop. After much research i got a graphical environment up and running. I cannot remember which files I edited to make this happen or if I installed xdm, gdm, or kdm. I do know that i installed the latest kde from ports. I configured it so that i get a graphical login and i am not allowed to login as root. once i am logged in i start konsole to configure internet and such. i try variations of the su command and all i get is "Sorry". i logged in in single user mode and added my user to the groups wheel and operator; still nothing. the permissions of su are -r-sr-xr-x.If anyone needs more information please let me know. 
thanks


----------



## vincepoy (Feb 6, 2010)

How did you add the user in single user mode?  Did you run vipw?


----------



## artor19 (Feb 6, 2010)

no i already had added it with sysinstall before i set the graphical environment. i just used single user mode to change the groups he belongs to.


----------



## adamk (Feb 6, 2010)

And if you run 'groups' the user shows up in wheel?  Are you sure you are entering the correct password for root?


----------



## vincepoy (Feb 6, 2010)

Actually, you might want to /usr/bin/passwd root in single user mode since you said you can't login as root, this is from the console hopefully
so your su won't work either until you have the correct password for root.


----------



## artor19 (Feb 6, 2010)

su does not even ask me for a password it just says Sorry. as far as my root password i changed it already with single user mode just to be sure i knew what it was. the graphical login does not reject my root password it says that root logins are not allowed.it seems clear to me that when i set up X i did something wrong. i just have no idea what it was. oh yeah my user does show in groups as a member of wheel and operator.


----------



## vincepoy (Feb 7, 2010)

What about if you use the text login to login as root, use alt-Fn where Fn is your function keys, only F8 is supposed to be on graphical, so F1 and F2 should have text mode logins.

What does your /etc/group actually look like, I'll use user as the name of the user and your /etc/group is supposed to look like this:

```
wheel:*:0:root,user
operator:*:5:root,user
```

Make sure the root is still there.


----------



## sixtydoses (Feb 7, 2010)

vincepoy said:
			
		

> What about if you use the text login to login as root, use alt-Fn where Fn is your function keys, only F8 is supposed to be on graphical, so F1 and F2 should have text mode logins.



GUI is on F9.


----------



## artor19 (Feb 7, 2010)

group is supposed to be root, user? i used root:user. that could be the problem. also if i do Fn F1,2,3... i will get a text login? ill try these and let you know. thanks


----------



## vincepoy (Feb 7, 2010)

sixtydoses said:
			
		

> GUI is on F9.



You're right since I forgot that the count starts from v0.


----------



## vincepoy (Feb 7, 2010)

artor19 said:
			
		

> group is supposed to be root, user? i used root:user. that could be the problem. also if i do Fn F1,2,3... i will get a text login? ill try these and let you know. thanks



Yes, because root is supposed to stay in the group followed by added users after the comma... You only need to add the user to the group wheel in really... Assuming you are using 8.0-RELEASE which should by default looks like this:


```
# $FreeBSD: src/etc/group,v 1.35.10.1.2.1 2009/10/25 01:10:29 kensmith Exp $
#
wheel:*:0:root
daemon:*:1:
kmem:*:2:
sys:*:3:
tty:*:4:
operator:*:5:root
mail:*:6:
bin:*:7:
news:*:8:
man:*:9:
games:*:13:
ftp:*:14:
staff:*:20:
sshd:*:22:
smmsp:*:25:
mailnull:*:26:
guest:*:31:
bind:*:53:
proxy:*:62:
authpf:*:63:
_pflogd:*:64:
_dhcp:*:65:
uucp:*:66:
dialer:*:68:
network:*:69:
audit:*:77:
www:*:80:
nogroup:*:65533:
nobody:*:65534:
```

You just have to change, actually add the other users who should have root access besides root itself.

```
wheel:*:0:root
```

so it's:

```
wheel:*:0:root,user1
```

or 


```
wheel:*:0:root,user1,user2
```

If you hit ALT+Fn key where Fn is F1-F8,F10-F12 keys, you'll get the text login.  ALT-F9 will get you back to the graphical login.  These are all virtual consoles and ALT-F1 is the one that will display the messages from the OS.


----------



## artor19 (Feb 7, 2010)

that worked. i needed the comma, not colon in group. thank you very much. if i would have read the documentation a little closer i would have seen it.


----------



## vincepoy (Feb 7, 2010)

No problem at all, glad that your problem is solved.


----------



## SirDice (Feb 8, 2010)

Another, easy, way to do it is:
`# pw groupmod wheel -m user1`


----------

