LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Start "NetworkManager" at boot (https://www.linuxquestions.org/questions/linux-networking-3/start-networkmanager-at-boot-922470/)

raysr 01-06-2012 03:00 PM

Start "NetworkManager" at boot
 
Using openSuse 12.1 with Gnome and NetworkManager. I have to run root '/usr/sbin/NetworkManager' to start it. Is there a way to get it to automatically connect at boot?

corp769 01-06-2012 03:04 PM

If I am not mistaken, you can use chkconfig with suse 12.1.
Code:

chkconfig NetworkManager on
Make sure to run that as root.

Cheers,

Josh

raysr 01-06-2012 03:58 PM

Note: Forwarding request to 'systemctl is-enabled kexec.service'.
static
kexec on
lirc off
mdadmd off
microcode.ctl on
multipathd off
netstat off
network on
network-remotefs on
nfs off
nmb off
nscd on
ntp off
openvpn off
pm-profiler off
Note: Forwarding request to 'systemctl is-enabled postfix.service'.
disabled
postfix off
powerd off
purge-kernels on


Looks like it's on. Don't tell me I've been running the command line for a month when I didn't need to???

Thanks for the reply

raysr 01-06-2012 04:05 PM

Nah, I rebooted and it was off when it came up. I still had to run the command line to start 'NetworkManager'.

corp769 01-06-2012 04:31 PM

You should be able to run the following to get it to turn on at boot:
Code:

systemctl enable NetworkManager.service

raysr 01-06-2012 11:06 PM

Thanks for the help but it didn't work.

MartinStrec 01-10-2012 07:10 PM

If chkconfig doesn't work
(chkconfig NetworkManager --level 35 on)
and systemctl also doesn't work
systemctl enable NetworkManager.service

try to setup configuration files manualy

1. using systemd make the link:
ln -s /lib/systemd/system/NetworkManager.service /etc/systemd/system/multi-user.target.wants/NetworkManager.service

2.using sysv, make links
ln -s /etc/rc.d/NetworkManager /etc/rc.d/rc3.d/S23NetworkManager
ln -s /etc/rc.d/NetworkManager /etc/rc.d/rc5.d/S23NetworkManager
(there are missing stop service links, even it doesn't mind)

raysr 01-10-2012 08:55 PM

Thanks again, but neither worked. No errors, but didn't work.

MartinStrec 01-11-2012 04:03 AM

Well, see /var/log/messages
Are there any messages of NetworkManager?

What about boot.log? Please, post /var/log/boot.log

Are your interfaces really managed by NM?

Probably check your configuration files of NM.
http://live.gnome.org/NetworkManager/SystemSettings

raysr 01-11-2012 02:05 PM

This never happened before. I can't copy the results from the terminal. But they say>'/var/log/boot.log-no> such file or directory', '/var/log/messages'> permission denied. I've seen no messages from NM.

corp769 01-11-2012 02:06 PM

You need to be root in order to access those files.

raysr 01-11-2012 02:11 PM

I was.

MartinStrec 01-11-2012 02:43 PM

Do you use SELinux? Type 'id -Z', if you see something like 'unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023', the SELinux is enabled.

Try to disable SELinux '/etc/selinux/config'
line:
SELINUX=disabled
# intead of enforcing

You have to reboot to switch SELinux enable/disable

If that matter is because of SELinux wrong policy, you have access to /var/log/messages and /var/log/boot.log now and probably it could fix NM problem.
Well, finally I cannot say if it will be working. Your problem is very unusual.

raysr 01-11-2012 08:10 PM

openSuse 12.1

TobiSGD 01-11-2012 10:42 PM

Gnome NetworkManager is a graphical program and therefore can't be started before X is running, IIRC. Add it to the autostart list of your GUI environment.

MartinStrec 01-12-2012 04:06 AM

I think NetworkManager (the service) is just a service that manage network interfaces using its own profiles of network configurations. The second runnable program is the 'nm-applet' the has to be run under the X. The 'nm-applet' is easy way to change network profiles by GUI. Even if you run NM without X that just has to exist a default network profile of the eth or wlan, otherway no interface is activated and no IP (manually or DHCP) can be set.

The NM installed in Fedora/RHEL/Debian systems really starts before X. Of course the nm-applet starts when GNOME is loaded X.

Is there a mistake in my understanding of NM?

raysr 01-12-2012 01:47 PM

Thanks for the reply. How?

MartinStrec 01-12-2012 02:06 PM

I missed something, does disabling SELinux help?

raysr 01-12-2012 02:49 PM

What's SELinux?

MartinStrec 01-12-2012 03:05 PM

SELinux - how to disable, read my messages back.

SELinux is "Security Enhanced Linux" developed by NSA (National Security Agency). It is built in end it is enabled by default in many distributions. It has its own system of rights and access control. SELinux rights and logic is different and really more complex than Linux user rights. (see http://en.wikipedia.org/wiki/Security-Enhanced_Linux )

Linux can deny access to files, processes, operations etc. It doesn't mind if you are root (process runs under root) or not. The root user is not a privileged user in SELinux.

If a system does uncommon things (such as denials, prermission deny, something doesn't work). It is very important to check if SELinux allows your operations. When you don't know what to check or how to check, the most easy way is disable SELinux. If everything works, the problem is in SELinux policy. (Policy is s set of files, restrictions, MAC, ACL, ...)

raysr 01-12-2012 08:32 PM

ray@linux-fl8w:~> /etc/selinux/config
bash: /etc/selinux/config: No such file or directory
ray@linux-fl8w:~> su
Password:
linux-fl8w:/home/ray # /etc/selinux/config
bash: /etc/selinux/config: No such file or directory
linux-fl8w:/home/ray #

raysr 01-12-2012 08:42 PM

ray@linux-fl8w:~> su
Password:
linux-fl8w:/home/ray # echo 0 >/selinux/enforce
linux-fl8w:/home/ray #

So this turns it off apparently. Now what? http://www.crypt.gen.nz/selinux/disable_selinux.html

raysr 01-12-2012 09:25 PM

Solved. I went into Yast>Network Settings and noticed that "user controlled with NM" wasn't ticked. "Traditional method w/ifud" was ticked. Ticked 'NM' and all is well. I never went into there because NM was present on the desktop upon installation.

Thank you for your patience and you time.

corp769 01-12-2012 11:17 PM

Sometimes it's the simple things :p

Cheers on fixing your problem!

Josh

MartinStrec 01-13-2012 01:56 AM

Well, now when you are sure, that it was due to SELinux, use setroubleshootd to detect, what was happend.

Just type 'sealert' into command line.

'sealert' is a gui tool, that can advice you how to set SELinux properly. It writes commands you have to.

Sometimes it can be danger to allow everyhting, but in case of NetworkManger it will be ok.


Also you can set up SELinux just to log messages (what is wrong) instead of deny!

Just set /etc/selinux/config
SELINUX=permissive

Put the result of SELinux audit (/var/log/audit/audit.log) as a question in the Security forum rather then Network forum.


I recommend you using SELinux in enfocing mode to protect your computer before attacks. So take a care about correct settings of it.

raysr 01-13-2012 11:54 AM

"sealer" or "sealert" ??

MartinStrec 01-13-2012 12:22 PM

sealert

raysr 01-13-2012 10:34 PM

ray@linux-fl8w:~> su
Password:
linux-fl8w:/home/ray # sealert
If 'sealert' is not a typo you can use command-not-found to lookup the package that contains it, like this:
cnf sealert
linux-fl8w:/home/ray # cnf sealert
sealert: command not found
linux-fl8w:/home/ray #


??????????

corp769 01-14-2012 12:09 AM

Quote:

Originally Posted by raysr (Post 4574124)
ray@linux-fl8w:~> su
Password:
linux-fl8w:/home/ray # sealert
If 'sealert' is not a typo you can use command-not-found to lookup the package that contains it, like this:
cnf sealert
linux-fl8w:/home/ray # cnf sealert
sealert: command not found
linux-fl8w:/home/ray #


??????????

Looks like you don't have selinux installed then..... ;)

MartinStrec 01-14-2012 03:00 AM

I really use SELinux to secure my desktop and servers. However I mostly use Fedora. I think 'sealert' is usually installed with setroubleshootd. Try to find that daemon that can help you solve problems like yours. Of course, there can be another tool like 'sealert' in SuSe.


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