LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 03-02-2013, 12:19 PM   #1
kox444
Member
 
Registered: Aug 2012
Posts: 128

Rep: Reputation: Disabled
linux user levels?


Hi. I want to make a sandbox-user for network apps just for some more security. However I have 2 issues. Just like root is above all other normal users, I want to have my user above sandbox user, so I don't have to type password when I su as him. Are there user levels or something like that in linux?
Second minor problem is when I run iceweasel as sandbox user I get warning:
"owner of /tmp/orbit-user is not the current user"
The browser runs however, I don't know if this warn is important.
I'm running Debian Squeeze.
 
Old 03-02-2013, 04:43 PM   #2
lykwydchykyn
Member
 
Registered: Mar 2006
Location: Tennessee, USA
Distribution: Debian, Ubuntu
Posts: 135

Rep: Reputation: 36
Quote:
Originally Posted by kox444 View Post
Hi. I want to make a sandbox-user for network apps just for some more security. However I have 2 issues. Just like root is above all other normal users, I want to have my user above sandbox user, so I don't have to type password when I su as him. Are there user levels or something like that in linux?
No, it's not really a heirarchy like that. There's root, and there's everyone else.
What you probably can do instead is install sudo and set it up so that your user can run commands as the sandbox user without entering a password. Not sure of the exact syntax, you'll want to read up on sudo.

Quote:
Second minor problem is when I run iceweasel as sandbox user I get warning:
"owner of /tmp/orbit-user is not the current user"
The browser runs however, I don't know if this warn is important.
I'm running Debian Squeeze.
Not entirely sure what /tmp/orbit-user is, but I think it has to do with interprocess communication. Probably firefox uses it to communicate back to your desktop environment. As long as it works, I wouldn't worry much about it.
 
Old 03-03-2013, 01:40 AM   #3
kox444
Member
 
Registered: Aug 2012
Posts: 128

Original Poster
Rep: Reputation: Disabled
But how can I do this? I mean sudo as sandbox user w/o password and not sudo as root w/o password.
Btw Is there a way to pass password automatically in a bash script to su?
Edit: I can't use sudo as X doesn't work properly even in gksudo it throws me an error. I have to do it with su (or rather sux). It works perfectly with sux but how do I pass password automatically?

Last edited by kox444; 03-03-2013 at 03:16 AM.
 
Old 03-03-2013, 04:40 PM   #4
lykwydchykyn
Member
 
Registered: Mar 2006
Location: Tennessee, USA
Distribution: Debian, Ubuntu
Posts: 135

Rep: Reputation: 36
Quote:
Originally Posted by kox444 View Post
But how can I do this? I mean sudo as sandbox user w/o password and not sudo as root w/o password.
I don't know the exact syntax you'll need, just that sudo can do this. Start reading the sudoers man page. You'll want the NOPASSWD flag, and you'll probably ONLY want to enable iceweasel. Sudo can do things as users other than root, you just have to pass it a flag (I think it's -u ) to tell it what user you want to operate as.

Quote:
Btw Is there a way to pass password automatically in a bash script to su?
Not securely. You can use expect, but then your password is in the script.
Quote:
Edit: I can't use sudo as X doesn't work properly even in gksudo it throws me an error. I have to do it with su (or rather sux). It works perfectly with sux but how do I pass password automatically?
If you're ok with putting a password in the file, use expect.
If you want it to be reasonably secure, let's fix the problem with X and sudo. Probably running "xhost +local:''" before the sudo command is all you need to do.
 
Old 03-03-2013, 07:46 PM   #5
war49
LQ Newbie
 
Registered: Feb 2012
Location: Indonesia
Distribution: Slackware, Centos, Debian, RHEL
Posts: 13

Rep: Reputation: Disabled
Quote:
I can't use sudo as X doesn't work properly even in gksudo it throws me an error. I have to do it with su (or rather sux). It works perfectly with sux but how do I pass password automatically?
Did you already edit the sudoer config file ? and activated your user to su without password prompt ?

Exp: allow all su command for user:
your_user ALL=(ALL) NOPASSWD:ALL

In your shell script :
su <your_user> -c "your shell command"
 
Old 03-03-2013, 08:15 PM   #6
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,912

Rep: Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513
Quote:
Originally Posted by kox444 View Post
Hi. I want to make a sandbox-user for network apps just for some more security. However I have 2 issues. Just like root is above all other normal users, I want to have my user above sandbox user, so I don't have to type password when I su as him. Are there user levels or something like that in linux?
Second minor problem is when I run iceweasel as sandbox user I get warning:
"owner of /tmp/orbit-user is not the current user"
The browser runs however, I don't know if this warn is important.
I'm running Debian Squeeze.
It isn't done yet. What you are thinking of sounds like what is called "name spaces". It is possible to do, but still being developed. The kernel patches are still developing - but it is close (I suspect sometime this year).
 
  


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
Multiple Samba User Permission Levels Temujin_12 Linux - Software 7 03-11-2008 06:32 AM
Why won't my FC3 rc0 and rc6 levels not call kill script when entering those levels? dvkwiatk Linux - General 2 11-11-2006 08:09 AM
signal levels linux vs. windows bclear Linux - Wireless Networking 2 12-06-2004 06:17 AM
Ranking levels of linux? Tech1 Linux - Distributions 9 04-21-2003 07:15 PM
User levels? Eternal LQ Suggestions & Feedback 2 04-17-2002 07:01 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 06:24 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