LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 02-05-2004, 07:33 AM   #1
gamehack
Member
 
Registered: Jun 2003
Location: Sevenoaks, UK
Distribution: Ubuntu
Posts: 183

Rep: Reputation: 30
User Permission Explained


So until now I have used my linux box only with root and now I am sick of the warnings that tell me it is stupid to work with root,and also I am concerning the security reasons So I created my new user on my machine and now I have no access to the mounted partition and I have no sound.Can somebody tell me how to make them work ?
Thanks in advance
 
Old 02-05-2004, 07:40 AM   #2
Rounan
Member
 
Registered: Jun 2003
Location: Ontario
Distribution: Ubuntu, Gentoo, Debian
Posts: 416

Rep: Reputation: 30
permissions are managed with the chmod command

read 'man chmod' for more info.

To change permissions for a mounted partition, you need to enter some options in fstab.
look at /etc/group to see a listing of user groups, and find one that suits the partition - maybe "staff", since that's used by default for several library directories in Debian that you'll want access to.
then you'll need to add gid=xxx to the appropriate field in fstab, and another option to set permissions. I can't remember syntax exactly, maybe gmask? man fstab for details. a google search should also turn up a number of tutorials.

For sound, you just need to put your normal user in group 'audio'. And might as well put yourself in 'staff' while we're at it:

adduser user_name audio
adduser user_name staff

That oughtta do it. Learn to love chmod.

--Rounan
 
Old 02-05-2004, 08:44 AM   #3
gamehack
Member
 
Registered: Jun 2003
Location: Sevenoaks, UK
Distribution: Ubuntu
Posts: 183

Original Poster
Rep: Reputation: 30
thanks
 
Old 02-06-2004, 11:33 AM   #4
sneak
LQ Newbie
 
Registered: Feb 2004
Posts: 21

Rep: Reputation: 15
i have the same problem, i get:

user user_name already exist: please choose another.
when using adduser

what do i have to add to /etc/groups to make it work, audio doesn't exist. adding it has no effect but root has sound somehow.

### my /etc/group file #####

root::0:root
bin::1:root,bin,daemon
daemon::2:root,bin,daemon
sys::3:root,bin,adm
adm::4:root,adm,daemon,snk
tty::5:
disk::6:root,adm,games,snk
lp::7:lp
mem::8:
kmem::9:
wheel::10:root,snk
floppy::11:root,snk
mail::12:mail
news::13:news
uucp::14:uucp
man::15:games
games::20:games,snk
slocate::21:
utmp::22:
smmsp::25:smmsp
mysql::27:
rpc::32:
sshd::33:sshd
gdm::42:
shadow::43:
ftp::50:
pop::90op
nobody::98:nobody
nogroup::99:
users::100:games,snk
console::101:games

#########################

also,
i have to use a mixer to unmute PCM and Volume every time I reboot and log in, even though i save the settings every time

what file is that stored in.

i use slackware 9.1 btw
please help.
 
Old 02-06-2004, 12:03 PM   #5
Rounan
Member
 
Registered: Jun 2003
Location: Ontario
Distribution: Ubuntu, Gentoo, Debian
Posts: 416

Rep: Reputation: 30
If you don't have an audio group, see what group your sound devices are assigned to:
in /dev
ls -l dsp

Output looks like:
lrwxr-xr-x 1 root root 9 Jan 18 14:44 dsp -> /dev/dsp0

First it gives permissions, then owner, then group - in this case, owner root group root.

your adduser is probably messing up because the audio group doesn't exist - it doesn't recognize it as a group add command, and is assuming you're trying to add another user.
Create and audio group if you like, add yourself to it, and change your devices to that group with chgrp
Otherwise, can just chmod 666 on each device to grant everyone full permissions to it. this is a security issue, but sound's generally nonessential and if you're just running a workstation it's no big deal.

For your volume issue - are you using ALSA? the latest version should do it automatically, but you need to make sure that part of your shutdown script includes: alsactl store
and your startup script contains: alsactl restore
this saves your settings on exit, loads on startup.

--Rounan
 
Old 02-07-2004, 08:47 PM   #6
delkian
LQ Newbie
 
Registered: Sep 2003
Location: Finland
Distribution: Debian sid
Posts: 4

Rep: Reputation: 0
Like Rounan said, check what group owns the 'dsp' device in /dev. If you want to use a group called 'audio' for it, try something like

addgroup audio # if the group doesn't exist already
chown root:audio /dev/dsp # sets the owner of the device 'file' to root but the group to audio
chmod g+rw /dev/dsp # adds read and write permissions to the sound device for the group
adduser your_username audio # add yourself to the group

Do these as root, of course. If you're logged in as your normal user, you probably need to log in again with it before everything takes effect.


Edit: Fixed a little mistake.
 
Old 02-10-2004, 09:01 AM   #7
sneak
LQ Newbie
 
Registered: Feb 2004
Posts: 21

Rep: Reputation: 15
ok that did it, thx guys
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
User Permission kwtan Linux - Newbie 2 11-22-2005 10:32 PM
Super-User question , explained below Linux_interest Linux - Newbie 5 09-05-2004 09:32 PM
user permission demmylls Linux - General 7 12-19-2003 05:53 AM
User permission cerberus Linux - General 1 05-19-2003 01:50 PM
user permission richie Linux - Newbie 1 05-02-2001 04:12 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 10:07 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration