« first day (2873 days earlier)      last day (2072 days later) » 

11:46 AM
Hello Guys...
Am trying to understand the user management in Linux
 
Hi
What's your question?
 
Am working on a Linux machine provided by my admins... Got root access for 2 weeks
Now... the non root user that I login with(say user123) takes me to /users/user123
But user123 does not exist in /etc/passwd
682
Q: A command to list all users? And how to add, delete, modify users?

nuxI need a command to list all users in terminal. And how to add, delete, modify users from terminal. That could help in administrating your accounts easily by terminal.

@avazula Why am doing this exercise? Will let u know.. once I understand this part..
Interestingly two machines that I access with user123 has shared filesystem... that means... from my laptop, if I scp a file into /users/user123 then both machines will see the file in /users/user123
This is all new for me...
Please help me understand this..
So.. what is user123? Is it not the real user?
# cat /etc/passwd | grep user123 gives nothing
 
@overexchange That's weird
 
hmm
Our admins are pretty smart.. because security is high priority in the sector I work for...
 
Why do you care to see user123?
 
11:57 AM
ok
 
I'm not sure being root allows you to do it
I'm kinda noob* though
Let me see
 
What is nood?
Sorry am not good in English...
Dictionary is not helping me... understand your English
 
noob. That means new/not good at it.
 
oh ok
 
Have you tried typing cut -d: -f1 /etc/passwd | grep user123 ?
 
12:00 PM
yes
same result
 
mmh
Have you asked this question on the forum associated with your Linux OS?
 
am asking now..
 
If you're new to asking be careful to include all details you've told me. It'll spare you time :)
 
@overexchange Your system is probably using LDAP
The Lightweight Directory Access Protocol (LDAP ) is an open, vendor-neutral, industry standard application protocol for accessing and maintaining distributed directory information services over an Internet Protocol (IP) network. Directory services play an important role in developing intranet and Internet applications by allowing the sharing of information about users, systems, networks, services, and applications throughout the network. As examples, directory services may provide any organized set of records, often with a hierarchical structure, such as a corporate email directory. Similarly...
Your user isn't actually defined as a local user to the machine you are logging into, that's why it's not in passwd
 
12:12 PM
ok
 # df -h /users/user123
    Filesystem                                           Size  Used Avail Use% Mounted on
    catonddff.abc.xyz.com:/vol/DDD0_ABCUSERS/prod/user123  1.6T  1.3T  301G  82% /users/user123
@terdon Do you understand something from this?
 
@overexchange Only that user123's home directory is mounted from the remote server catonddff.abc.xyz.com
 
@terdon which explains why they can't see it in /etc/passwd as root, right?
 
you mean... 1.6T space is mounted from catonddff.abc.xyz.com to my unix machine
 
But I don't really know how LDAP works, I've used systems using it, but I have never set it up myself. The answer to your main question, "why is my user not in /etc/passwd?", however, is "because your user is set up via LDAP and isn't a local user"
 
Am able to sudo su - with user123
How do I understand this?
 
12:14 PM
@avazula yep. And no need for root, simply grep user123 /etc/passwd would have been enough if the user were there
@overexchange yes
@overexchange What don't you understand?
I mean, what is confusing you?
 
@terdon makes sense to me
 
Is user123 existing on linux machine?
 
The LDAP user acts like a regular user for the machine. It just doesn't have an entry in /etc/passwd.
@overexchange Kinda :) It is a network user, not defined on the local machine, but the local machine validates users through LDAP somehow. I really don't know the details.
 
ok
Now.. my next question...
I installed an application using root...
 
the main point is that i) the user is not defined on the local machine but is defined via LDAP and ii) the local machine uses LDAP to authenticate the user and, once authenticated, the user can act like a normal, local user. So you can use sudo (not sudo su -, please).
70
Q: Is there ever a good reason to run sudo su?

terdonTo launch a root shell on machines where the root account is disabled, you can run one of: sudo -i : run an interactive login shell (reads /root/.bashrc and /root/.profile) sudo -s : run a non-login interactive shell (reads /root/.bashrc) In the Ubuntu world, I very often see sudo su suggeste...

 
12:18 PM
For security reasons... I cannot take root privilege to run/administrate that application..
So Do I need to create a local non root user?
 
@overexchange You already have one: user123
Why do you need a local one?
 
ok
Now.. sudo su - privilege will be lost for user123 in 2 weeks..
 
sudo privilege, yes
 
So.. I need to create a non root user that does not have sudo su - privilege...
 
why?
Just don't use sudo.
 
12:21 PM
I mean the new user should not get root provilege
 
And never use sudo su, it's ugly and pointless. Use sudo -i instead.
@overexchange Again, why?
Why make a new user at all? What's wrong with the user you already have?
 
ok
am a contractor and I will leave in 3 months...
So my user name(user123) will be purged in 3 months automatically
 
OK
But you still haven't explained why you need a new user.
 
If someone else needs to use the tool you installed, they can use it with their user.
 
12:24 PM
My mgr asks me to create a syslog user and have the application able to run as that user.... I installed Syslog-NG as root
ls /users only has user123
 
@overexchange I don't know what a syslog user is. if you just mean a user whose only reason to exist is to run this Syslog-NG thing, then just create a new user. However, if you do this on the local machine, then the user will only exist on the local machine.
 
I mean just a user.... whose only reason to exist is to run this Syslog-NG thing
 
You should talk to your sysadmin if you need to create a new LDAP user.
@overexchange Great, so create one.
 
ok
But how to know/inform the privilege levels of any existing LDAP user? For example user123
To inform sysadmin..
What is the command to know the privilege levels of user123?
 
@overexchange this is why you really should post questions instead of asking in chat. That way you can actually explain the entire situation. Why do you need to inform the sysadmin? Why do you need to know the privilege levels of user123? What do you even mean by "privilege levels"? Why is user123 relevant if it's going to be deleted in 2 weeks?
 
12:31 PM
user123 will not be deleted in 2 weeks... it will be deleted after 3 months.. which is not the concern..
user123 as sudoer will be removed after 2 weeks
Idea to create a syslog user is to then sudo to the syslog user to maintain the application.
 
ok
 
and this syslog user will be forever as sudoer..
Every body will login with this username..
Can that be a LDAP user or local user is a different question..
sysadmin will decide it...
Most probably it should be local user...
because this user belongs to an application but not to any employee...
 
 
1 hour later…
1:53 PM
@terdon Do i need to ask such questions in superuser or unix forum?
Because I asked in unix forum..
 
No, Unix is fine
 
ok
0
Q: Changing group ownership of files - User management

overexchangeInstalled an application as root owner but not as non-root. why? Because we had to install this application in custom location(/app) So, after installing an application(Syslog-NG), below are the files with current ownership: # ls -l /app/syslog-ng/etc/syslog-ng.conf -rw-r--r-- 1 root root 938 A...

 
It's just better to post a question than asking in chat
@overexchange Cool, thanks!
 
After talking to you... I got clarity on what to ask?
There are levels in subject matter expertise...
1) Unconciously Incompetent 2) Conciously Incompetent 3) Conciously competent, 4) Unconciously Competent
@terdon My guess is I moved from 1 to 2 after talking to u
 
heh :)
 
1:59 PM
hahaha
I got these MBA jargon from Agile SCRUM training... Can you imagine? Otherwise am very bad in English...
Some idiot who was not good technically... was my Agile coach in previous company I work for
BTW... every Computer science student should have these Linux skills..
 
2:15 PM
@overexchange That's an iterative process; one usually move through all four stages many times on any given topic, each time on a deeper level.
 
@Kusalananda Hai how r u man?
Last time we talked I was in previous to previous company
I have change two employers after our last chat..
I did not get u... Iterative process? Are you talking about Agile SCRUM?
Aaah i got u..
If a technician is Iterative then that means... he is making mistake to learn first principles of his domain...
It should not be iterative..
2,3,4 can be iterative...
Currently ...
ls -l /app/syslog-ng/etc/syslog-ng.conf
-rw-r--r-- 1 root root 938 Aug 20 12:43 /app/syslog-ng/etc/syslog-ng.conf
After running this command sudo chgrp foo /app/syslog-ng/etc/syslog-ng.conf
file should have permissions like..
ls -l /app/syslog-ng/etc/syslog-ng.conf
-rw-rw-r-- 1 root foo 938 Aug 20 12:43 /app/syslog-ng/etc/syslog-ng.conf
Is that correct?
 
2:31 PM
@Kusalananda That is right, rule evaluation is a concrete example. The expert system checks all the rules and if no one is firing anymore the reasoning process stops.
 
@overexchange Hmm... Why did the permissions change?
 
Forgot to copy paste: sudo chmod 664 /app/syslog-ng/etc/syslog-ng.conf
But I would be running these commands as root.. I would not need to sudo these commands.. Is that correct?
 
@overexchange If you are running the commands as root, you will not need sudo, that is correct.
 
ok
Why every user is able to run this binary?
# ls -l /app/syslog-ng/sbin/syslog-ng
-rwxr-xr-x 1 root root 39768 Aug 20 12:43 /app/syslog-ng/sbin/syslog-ng
r-x with group name as root
So... how come a new local user(non root) created will be able to execute?
without chgrp command
 
@overexchange Because the user, the group, and everyone else has both r and x permissions on the binary.
 
2:38 PM
Hi everyone
 
ok
So this new user will be part of everyone else in the list of users.. Is that correct?
 
I am getting segmentation fault(core dumped).
 
@overexchange If you removed the r and x permissions for "other", with chmod o-rx filename, then only the owner and group could execute it.
@PrabhjotSingh Then you've done something wrong.
 
hahaha
 
@overexchange That is correct.
 
2:40 PM
something wrong..
hahaha
 
This happens in my Fedora machine. But in windows this runs perfectly
 
@PrabhjotSingh Is it a C program?
 
Ya So... Fedora has dome something wrong..
What is the stack trace?
 
@Kusalananda yes
 
SIGSEGV
 
2:42 PM
@PrabhjotSingh Different compilers (even different versions of the same compiler) may generate code that handles buffer overruns differently, but getting a segmentation fault is generally a sign of a buffer overrun. An array is not large enough to hold the data, or you're stepping off the end of an array.
 
@overexchange I've thought about the OP bit deeper and found a first answer to the problem of group ownership. The first step is to model the UNIX permissions in an ontology. In the second step the formal model can used by a PDDL like planner to generate an attack plan. The third step is to execute the attack plan against the target. So, how does look your model?
 
The fact that Windows manages to run the code just means that the space allocated for your array is not followed by anything essential, and that the runtime system doesn't catch you walking off the end of it (which it should do IMHO).
 
or a C pointer pointing to some weird location..
 
@overexchange Well, the location after the end of an array is a weird location.
 
Pointer pointing to 0x100(say kernel space) is one possibility.... crossing array boundary into another process space is another possibility... Same reason....
 
2:47 PM
@overexchange I believe that that should cause a bus error, since that memory should be protected and not available to a user space process. But I'm not sure.
 
@PrabhjotSingh As problem is in linux... have source code in hand.. take core dump and play with gdb
Just google gdb coredump
bt should give the reason
I dont remember the steps now.. I did this in 2008-2009
@Kusalananda Now... for an LDAP user to modify this file...
ls -l /app/syslog-ng/etc/syslog-ng.conf
-rw-rw-r-- 1 root foo 938 Aug 20 12:43 /app/syslog-ng/etc/syslog-ng.conf
What are the steps required?
In this answer he did not mention.. how to add a user in that group?
adduser user1
How to add user1 into foo?
@Kusalananda Does the answer look incomplete?
 
3:35 PM
@overexchange It looks like an ok answer to me, but it does not address the fact that you have users in an LDAP database. Unfortunately I have zero experience with LDAP.
 
 
1 hour later…
4:38 PM
@Kusalananda An employe will first login with his own LDAP username to Linux machine and sudo to this local user to work with app.. I did not get u...
 
 
4 hours later…
8:46 PM
te
Tempted to close this as a duplicate of Kalihttps://unix.stackexchange.com/questions/463950/ubuntu-not-replying-to-arp-r‌​equests Script kiddies use exploits/dark utils and then come asking incomplete questions wondering why things change behaviour.
2
Q: Ubuntu not replying to ARP requests

JRszI experience a behavior on my linux machine that I cannot explain. I see incoming ARP requests but they are not answered by my machine. When I plug the Ethernet cable into a Windows 10 machine those ARP requests are being answered. I also noticed that I cannot capture the traffic on this device ...

 
9:33 PM
Okay I noticed Ubuntu does Ctrl+Shift+C for copy I belieev by default
Is Ctrl+Shift not really that common of a key in unix programs?
 
9:56 PM
@William Shifting between Mac, Linux and ocasionally Windows I just use the app menus as I get lost.
 
@RuiFRibeiro I agree that is what I did in Windows
but my question was more about unix
applications
and key combo liklihood
 

« first day (2873 days earlier)      last day (2072 days later) »