if you wish to get root rights, you just do
without any specific username (well, I'm not sure if it matters, actually). if you wish to run a command as root, instead, just run
and put the command you want to run in place of
commandname in the above example. after you run that command, "su" asks for your
own password to run the command. an example:
Code:
su mount /dev/cdrom /mnt/cdrom
Password:
would mount a cd, after you gave your password, if you had a directory /mnt/cdrom created and the cd device file was /dev/cdrom.
if you mount some device (a cdrom) as root, you probably can only access it as root, because it's mounted with root privileges only. an option is to change the permissions so normal users can use the device too, or then mount as a normal user. both need you to alter some configurations, maybe; either add some user to a group that has access to the mount command (usually the group is called mount) or then edit the fstab file (where the mountable filesystems are configured) and add there usermask.
To add the usermask: open /etc/fstab as root, locate the line where it says something about your cdrom (the line probably starts with /dev/cdrom or something similar) and at the 4th column, where the options are, add a dot and "umask=0222"; an example: if the line would be
/dev/cdrom /mnt/cdrom auto defaults 0 0
then you would change it to this:
/dev/cdrom /mnt/cdrom auto defaults
,umask=0222 0 0
and it should work. another way around is to try and add your user to the mount-group:
Code:
sudo useradd -G mount
and then re-try to mount the cdrom:
(if your cdrom is mounted into some other place than /mnt/cdrom, change that accordingly)