# GELI: Problem to mount Harddisk as user



## BeaSDBoy (Dec 5, 2010)

Hi,

I'm using GELI since a while. Until now I mount the container as root. When I try to mount as a regular user I've got following error:

```
andy@apollo ~ > id
uid=1000(andy) gid=1000(andy) groups=1000(andy),5(operator)
andy@apollo ~ > geli attach -dpvk ad1s1.key /dev/ad1s1
geli: Cannot lock memory: Operation not permitted.
```

What I did:
I added user andy to group operator, edited sysctl.conf and devfs.conf, .

```
/etc/devfs.conf.
own       /dev/da1s1   root:operator
perm      /dev/da1s1   0660

/etc/sysctl.conf
vfs.usermount=1

/etc/devfs.rules
[geli=10]
add path 'ad1s1.eli' mode 0660 group operator

/etc/rc.conf
devfs_system_ruleset="geli"
```

These settings seems to work. I can see the right permission (0660) when I mount as root. What I've forgot? What I have to do?

Thanks in advance for any help or hint.

Regards Andy


----------



## graudeejs (Dec 5, 2010)

User's don't have sufficient privileges.
Use either *su* or security/sudo

With later, you can allow only specific commands to be executed as root


----------



## BeaSDBoy (Dec 5, 2010)

Thanks, I solved the "problem" with sudo.


----------

