LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 09-28-2005, 07:14 PM   #1
satimis
Senior Member
 
Registered: Apr 2003
Posts: 3,428

Rep: Reputation: 53
Permission question


Hi folks,

BLFS 6.1

"alsamixer" can only be evoked as root.

bash-3.00$ which alsamixer
Code:
/usr/bin/alsamixer
After running
# chmod u+s /usr/bin/alsamixer

it can be started by all users but a grey window only without colour.

How to only authenticate "satimis" to start it in colour window not all users and how to make it?

TIA

BR
satimis
 
Old 09-28-2005, 10:42 PM   #2
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian Squeeze
Posts: 5,796

Rep: Reputation: 323Reputation: 323Reputation: 323Reputation: 323
You could try creating a special group, with only one member: Satimis. Then change the group owner to that special group 'chown root:<newgroup> /usr/bin/alsamixer'. Remove the user permission you just created, and give the new group permission 'chmod g+x /usr/bin/alsamixer'. Or something along those lines, at any rate.
 
Old 09-29-2005, 01:07 AM   #3
satimis
Senior Member
 
Registered: Apr 2003
Posts: 3,428

Original Poster
Rep: Reputation: 53
Hi bigrigdriver,

Tks for your advice.

Quote:
You could try creating a special group, with only one member: Satimis. Then change the group owner to that special group 'chown root:<newgroup> /usr/bin/alsamixer'
A group "audio" already exists;
Code:
root:x:0:
bin:x:1:
sys:x:2:
sys:x:2:
kmem:x:3:
tty:x:4:
tape:x:5:
daemon:x:6:
floppy:x:7:
disk:x:8:
lp:x:9:
dialout:x:10:
#audio:!:11:satimis
audio:11:satimis
video:x:12:
utmp:x:13:
usb:x:14:
satimis:x:100:
cdrom:x:101:
and "satimis" is in "100".

# ls -l /usr/bin/alsamixer
Code:
-rwxrwxr-x  1 root root 61555 Sep 20 06:59 /usr/bin/alsamixer
I tried changing;

# chown root:audio /usr/bin/alsamixer
Code:
chown: `root:audio': invalid group
but failed.

Others noted with tks

BR
satimis
 
Old 09-29-2005, 01:28 AM   #4
Dark_Helmet
Senior Member
 
Registered: Jan 2003
Posts: 2,786

Rep: Reputation: 369Reputation: 369Reputation: 369Reputation: 369
You modified the /etc/group file, and audio is no longer a valid group:
Code:
#audio:!:11:satimis
audio:11:satimis
video:x:12:
The manual page for /etc/group (man group) does not say you can comment a line with a beginning '#'. Delete the #audio line. Then look at the plain audio line and the video group below it. Notice a difference? You removed one of the fields. The 'x' does matter. You need to change the line to:
Code:
audio:x:11:satimis
Again, read the man page for what each field represents.

After you fix /etc/group, run the chown command again.

Then, as a user satimis, execute groups and make sure audio is listed. If it isn't, you need to log out of the system completely. Opening a new xterm won't work. In fact, I would suggest you reboot if the audio group is not listed. Then run the command again to verify satimis is part of the audio group, and do any other permission restrictions on alsamixer or other commands.

Last edited by Dark_Helmet; 09-29-2005 at 01:42 AM.
 
Old 09-29-2005, 02:13 AM   #5
satimis
Senior Member
 
Registered: Apr 2003
Posts: 3,428

Original Poster
Rep: Reputation: 53
Hi Dark_Helme,

Tks for your advice.

Performed following steps;

# nano /etc/group
deleted: # audio:!:11:satimis:
added; audio:x:11:satimis

# ls -l /usr/bin/alsamixer
Code:
-rwxrwxr-x  1 root root 61555 Sep 20 06:59 /usr/bin/alsamixer
# chown root:audio /usr/bin/alsamixer
# ls -l /usr/bin/alsamixer
Code:
-rwxrwxr-x  1 root audio 61555 Sep 20 06:59 /usr/bin/alsamixer
# chmod g+x /usr/bin/alsamixer

Rebooted BLFS 6.1

Now "alsamixer" can start as "user/satimis" but only a black/white screen displayed similar to running;

# chmod u+x /usr/bin/alsamixer
not colour screen.

Any advice. TIA

BR
satimis
 
Old 09-29-2005, 02:22 AM   #6
Dark_Helmet
Senior Member
 
Registered: Jan 2003
Posts: 2,786

Rep: Reputation: 369Reputation: 369Reputation: 369Reputation: 369
If you only want only user satimis (and root) to have execute permissions, you need to run a different chmod command. I would suggest:
Code:
# chmod 660 /usr/bin/alsamixer

I'm afraid I don't understand your second comparison. You say you get a black and white screen. Does it display vertical volume controls? If it does, then alsamixer is working. I wouldn't be concerned with it not having color. If you don't see the volume controls, then something else is wrong. Check the man page for alsamixer, see what files it writes to (if any) and make sure user satimis has write access to the necessary directories and/or files. If alsamixer wants to write to a file and can't, it may just kill itself without doing anything.
 
Old 09-29-2005, 02:44 AM   #7
satimis
Senior Member
 
Registered: Apr 2003
Posts: 3,428

Original Poster
Rep: Reputation: 53
Hi Dark_Helmet,

Quote:
If you only want only user satimis (and root) to have execute permissions, you need to run a different chmod command. I would suggest:
Code:
# chmod 660 /usr/bin/alsamixer
bash-3.00# chmod -c 660 /usr/bin/alsamixer
Code:
mode of `/usr/bin/alsamixer' changed to 0660 (rw-rw----)
# exit
exit
$ alsamixer
Code:
bash: /usr/bin/alsamixer: Permission denied
$ su
Password:
# chmod -c 770 /usr/bin/alsamixer
Code:
mode of `/usr/bin/alsamixer' changed to 0770 (rwxrwx---)
# exit
exit
$ alsamixer

Alsamixer started.

Quote:
I'm afraid I don't understand your second comparison. You say you get a black and white screen. Does it display vertical volume controls....
Yes, it did, working normally. Volumn can be adjusted. But the vertical bar is black. As 'root' it is coloured so that you known which level you adjust not to exceeding the red level.

satimis
 
Old 09-29-2005, 02:53 AM   #8
Dark_Helmet
Senior Member
 
Registered: Jan 2003
Posts: 2,786

Rep: Reputation: 369Reputation: 369Reputation: 369Reputation: 369
Quote:
# chmod -c 770 /usr/bin/alsamixer
You're correct. I made the mistake. I meant to say chmod 550 (to give root and satimis read & execute permissions). I didn't think there would be a need to have write permissions on an executable file.

As for the color, if root has a colored display and satimis doesn't, then I'd compare root's environment settings to satimis. Check the home directories of root and satimis to see if there are dot files present in one and not the other. Also check the contents of the files for differences that might explain it.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Question on permission satimis Linux From Scratch 5 09-28-2005 03:42 AM
Another permission question javamdk Ubuntu 6 08-20-2005 10:09 AM
a question about file permission tony yu Mandriva 5 04-13-2004 11:18 AM
FTP permission Question Supp0rtLinux Linux - Software 2 04-29-2003 08:03 PM
Permission question, (short) Stingreen Linux - General 5 03-15-2002 12:19 AM


All times are GMT -5. The time now is 05:03 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration