Debian This forum is for the discussion of Debian Linux.
|
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
02-05-2004, 07:33 AM
|
#1
|
Member
Registered: Jun 2003
Location: Sevenoaks, UK
Distribution: Ubuntu
Posts: 183
Rep:
|
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
|
|
|
02-05-2004, 07:40 AM
|
#2
|
Member
Registered: Jun 2003
Location: Ontario
Distribution: Ubuntu, Gentoo, Debian
Posts: 416
Rep:
|
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
|
|
|
02-05-2004, 08:44 AM
|
#3
|
Member
Registered: Jun 2003
Location: Sevenoaks, UK
Distribution: Ubuntu
Posts: 183
Original Poster
Rep:
|
thanks 
|
|
|
02-06-2004, 11:33 AM
|
#4
|
LQ Newbie
Registered: Feb 2004
Posts: 21
Rep:
|
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::90  op
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.
|
|
|
02-06-2004, 12:03 PM
|
#5
|
Member
Registered: Jun 2003
Location: Ontario
Distribution: Ubuntu, Gentoo, Debian
Posts: 416
Rep:
|
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
|
|
|
02-07-2004, 08:47 PM
|
#6
|
LQ Newbie
Registered: Sep 2003
Location: Finland
Distribution: Debian sid
Posts: 4
Rep:
|
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.
|
|
|
02-10-2004, 09:01 AM
|
#7
|
LQ Newbie
Registered: Feb 2004
Posts: 21
Rep:
|
ok that did it, thx guys
|
|
|
All times are GMT -5. The time now is 04:01 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|