[ubuntu-studio-users] Firewire interface
Ralf Mardorf
ralf.mardorf at alice-dsl.net
Mon Apr 28 15:56:52 UTC 2014
> On 04/13/2014 11:45 AM, Kaj Ailomaa wrote:
> >
> > On Sun, Apr 13, 2014, at 02:27 PM, Israel wrote:
> >
> >> I did add myself to the audio group, though I will try the same command
> >> again (I think I used my actual username, instead of $USER)
> > $USER is an environment variable. It's more correct to use your username
> > directly, since using $USER only works if you are logged in as that
> > user, when running the command - with sudo (if logged in as root, root
> > will become a member of audio group).
If you want to add somebody to a group, use the username , not $USER.
If you want a script to test, if somebody does run this script with user
or root privileges, use id -u , not $USER. I guess what output you get
for $USER depends to your setup or distros default setup, but a
username always is a username and the output of id -u always gives
information about the privileges.
[rocketmouse at archlinux ~]$ echo $USER $(id -u)
rocketmouse 1000
[rocketmouse at archlinux ~]$ su
Password:
[root at archlinux rocketmouse]# echo $USER $(id -u)
rocketmouse 0
[root at archlinux rocketmouse]# exit
[rocketmouse at archlinux ~]$ sudo -i
[sudo] password for rocketmouse:
[root at archlinux ~]# echo $USER $(id -u)
root 0
[root at archlinux ~]# logout
[rocketmouse at archlinux ~]$
More information about the ubuntu-studio-users
mailing list